Skip to content

Instantly share code, notes, and snippets.

@nekonenene
Created February 1, 2016 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nekonenene/c0d05067c86be6a284eb to your computer and use it in GitHub Desktop.
Save nekonenene/c0d05067c86be6a284eb to your computer and use it in GitHub Desktop.
ブログ用: 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