Created
October 8, 2014 17:17
-
-
Save jah2488/5a6a0cf7c531b0ba173a 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
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| var connect = require('gulp-connect'); | |
| var jshint = require('gulp-jshint'); | |
| var stylish = require('jshint-stylish'); | |
| gulp.task('lint', function () { | |
| return gulp.src('./app/scripts/*.js') | |
| .pipe(jshint()) | |
| .pipe(jshint.reporter('jshint-stylish')); | |
| }); | |
| gulp.task('sass', function () { | |
| gulp.src('app/styles/*.scss') | |
| .pipe(sass()) | |
| .pipe(gulp.dest('app/styles')); | |
| }); | |
| gulp.task('connect', function() { | |
| connect.server({ | |
| root: ['app', 'bower_components'], | |
| livereload: true | |
| }); | |
| }); | |
| gulp.task('html', function () { | |
| gulp.src('./app/*.html') | |
| .pipe(connect.reload()); | |
| }); | |
| gulp.task('js', function () { | |
| gulp.src('./app/scripts/*.js') | |
| .pipe(connect.reload()); | |
| }); | |
| gulp.task('watch', function () { | |
| gulp.watch(['./app/*.html'], ['html']); | |
| gulp.watch(['./app/scripts/*.js'], ['lint', 'js']); | |
| gulp.watch(['./app/styles/*.scss'], ['sass', 'html']); | |
| }); | |
| gulp.task('default', ['connect', 'watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment