Created
July 6, 2016 04:02
-
-
Save openainext/259545f609e6a6bbab7fa8adc04247c8 to your computer and use it in GitHub Desktop.
Revisions
-
Abdullah created this gist
Dec 13, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ var gulp = require('gulp'), less = require('gulp-less'), path = require('path'), minifyCSS = require('gulp-minify-css'), browserSync = require('browser-sync').create(), nodemon = require('gulp-nodemon'); gulp.task('less', function () { return gulp.src('./public/stylesheets/less/main.less') .pipe(less()) .pipe(minifyCSS()) .pipe(gulp.dest('./public/stylesheets/css')); }); gulp.task('watch', function () { gulp.watch('./public/stylesheets/less/**/*.less', ['less']); gulp.watch("./views/**/*.ejs").on('change', browserSync.reload); }); gulp.task('browser-sync', ['nodemon'], function() { browserSync.init(null, { proxy: "http://localhost:3000", files: ["public/**/*.*"], browser: "google chrome", port: 7000, }); }); gulp.task('nodemon', function (cb) { var started = false; return nodemon({ script: './bin/www' }).on('start', function () { if (!started) { cb(); started = true; } }); }); gulp.task('default', ['less', 'watch','browser-sync']);