34 lines
747 B
JavaScript
34 lines
747 B
JavaScript
var gulp = require('gulp');
|
|
var plugins = require('gulp-load-plugins')({});
|
|
var karma = require('karma');
|
|
|
|
gulp.task('test', function(done) {
|
|
server = new karma.Server({
|
|
configFile: __dirname + '/test/karma.conf.js'
|
|
},function(exitCode) {
|
|
console.log('coucou');
|
|
done(exitCode);
|
|
console.log('coucou');
|
|
process.exit(exitCode);
|
|
});
|
|
server.start();
|
|
});
|
|
|
|
|
|
|
|
|
|
gulp.task('build', function() {
|
|
return gulp.src('./webapp/html/index.html')
|
|
.pipe(plugins.inject(
|
|
gulp.src(['./webapp/js/**/*.js']).pipe(plugins.angularFilesort()),
|
|
{
|
|
ignorePath: '/webapp'
|
|
}
|
|
))
|
|
.pipe(gulp.dest('./webapp'));
|
|
});
|
|
|
|
gulp.task('autobuild', function() {
|
|
return gulp.watch(['webapp/js/**/*.js','webapp/html/index.html'], ['build']);
|
|
});
|