Created
December 27, 2014 14:43
-
-
Save apsavin/f926c1550b94c1e74765 to your computer and use it in GitHub Desktop.
gulp file for bnsf project
This file contains 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'), | |
nodemon = require('gulp-nodemon'), | |
shell = require('gulp-shell'); | |
gulp.task('build', shell.task([ | |
'bem make' | |
])); | |
var nodemonInstance; | |
gulp.task('run', ['build'], function () { | |
if (!nodemonInstance) { | |
nodemonInstance = nodemon({ | |
script: 'desktop.bundles/index/index.node.js', | |
watch: '__manual__', | |
ext: '__manual__' | |
}).on('restart', function () { | |
console.log('~~~ restart server ~~~'); | |
}); | |
} else { | |
nodemonInstance.emit('restart'); | |
} | |
}); | |
gulp.task('watchAndRebuild', ['run'], function () { | |
gulp.watch('desktop.blocks/**/*', ['run']); | |
gulp.watch('config/*', ['run']) | |
}); | |
gulp.task('default', ['watchAndRebuild']); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment