Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ブログ用: jsmin をおこなうための gulp 設定ファイル
var gulp = require("gulp");
/* gulp とコマンドを打つと実行される */
gulp.task("default", function() {
console.log("Starting gulp...!!");
gulp.watch(["./original/*.js"], ["compress"]);
});
var uglify = require("gulp-uglify");
/* gulp compress とコマンドを打つと実行される */
gulp.task("compress", function() {
return gulp.src("./original/*.js")
.pipe(uglify())
.pipe(gulp.dest("./minified/"));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.