37 lines
819 B
JavaScript
37 lines
819 B
JavaScript
var gulp = require('gulp');
|
|
var plugins = require('gulp-load-plugins')({});
|
|
|
|
gulp.task('test', function() {
|
|
console.log(plugins);
|
|
return gulp.src('test/karma.conf.js')
|
|
.pipe(plugins.karma({
|
|
configFile: 'test/karma.conf.js',
|
|
action: 'run'
|
|
}))
|
|
.on('error', function(err) {
|
|
console.log(err);
|
|
this.emit('end');
|
|
});
|
|
});
|
|
|
|
|
|
gulp.task('autotest', function() {
|
|
return gulp.watch(['webapp/js/**/*.js','test/specs/*.js'], ['test']);
|
|
});
|
|
|
|
|
|
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']);
|
|
});
|