Skip to content

Instantly share code, notes, and snippets.

@justinpage
Created May 5, 2014 20:19
Show Gist options
  • Save justinpage/11546477 to your computer and use it in GitHub Desktop.
Save justinpage/11546477 to your computer and use it in GitHub Desktop.
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
livereload = require('gulp-livereload');
gulp.task('lint', function() {
gulp.src('./js/*')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(uglify())
.pipe(gulp.dest('dist'))
});
gulp.task("watch", function() {
gulp.src(".")
.pipe(livereload());
});
gulp.task("default", ["lint", "watch"]);
gulp.watch("./js/*", ["lint"]);
gulp.watch("index.html", ["watch"]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment