Created
May 6, 2019 20:13
-
-
Save puggan/580a74b90e3b897ead36ab8cb26bcee0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'body {color: pink}' > pink.less | |
echo "{}" > package.json | |
cat << HEREDOC > gulpfile.js | |
const gulp = require("gulp"); | |
const plug = require("gulp-load-plugins")(); | |
gulp.task("default", () => gulp | |
.src("pink.less") | |
.pipe(plug.sourcemaps.init()) | |
.pipe(plug.less()) | |
.pipe(plug.sourcemaps.write("./", {includeContent: false, sourceRoot: "a/"})) | |
.pipe(gulp.dest("b/")) | |
.pipe(plug.ignore.exclude("*.map")) | |
.pipe(plug.cssnano()) | |
.pipe(plug.sourcemaps.write("./", {includeContent: false, sourceRoot: "c/"})) | |
.pipe(gulp.dest("d/")) | |
); | |
HEREDOC | |
npm install --save gulp@3 gulp-load-plugins gulp-sourcemaps gulp-less gulp-ignore gulp-cssnano | |
gulp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment