Skip to content

Instantly share code, notes, and snippets.

@xynova
Last active September 24, 2016 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xynova/e509e67320bba0fd5c490ca349f1e88e to your computer and use it in GitHub Desktop.
Save xynova/e509e67320bba0fd5c490ca349f1e88e to your computer and use it in GitHub Desktop.
Gulp file setup
'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