Last active
September 24, 2016 03:32
-
-
Save xynova/e509e67320bba0fd5c490ca349f1e88e to your computer and use it in GitHub Desktop.
Gulp file setup
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
'use strict' | |
var gulp = require('gulp') | |
, requireDir = require('require-dir') | |
, runSequence= require('run-sequence') | |
; | |
/* Load additional gulp tasks */ | |
requireDir('./gulp-tasks') | |
/* Just run "gulp" to manually compile all the project related files */ | |
gulp.task('default', function (done) { | |
runSequence( | |
[ 'BUILD concat.angular.js' | |
, 'BUILD concat.layout.js' | |
, 'BUILD concat.libraries.js' | |
, 'BUILD concat.raven.js' | |
, 'BUILD common.templates.js' | |
, 'BUILD components.templates.js' | |
] | |
, ['BUILD concat.common.js', 'BUILD .css'] | |
, 'BUILD [module]/index-dist.html' | |
, done | |
); | |
}); | |
/** | |
* Starts nodejs servers to serve layout and api | |
* Watches for changes and executes a browser reload | |
*/ | |
gulp.task('dev', function(done){ | |
process.once('SIGINT',function(){ | |
process.nextTick(() => process.exit(0)); | |
}); | |
return runSequence( | |
'default' | |
, 'DEV START.servers' | |
, 'DEV OPEN.browser' | |
, 'DEV WATCH(templates,common,css)|BUILD' | |
, done | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment