-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
35 lines (29 loc) · 855 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var gulp = require('gulp');
var server = require('gulp-express');
var runSequence = require('run-sequence');
var del = require('del');
var templateCache = require('gulp-angular-templatecache');
gulp.task('dist', function () {
runSequence('dist:clean', 'dist:files', 'dist:views');
});
gulp.task('dist:views', function() {
return gulp.src('modules/**/*.html')
.pipe(templateCache('template/views.js', {module: 'template.views', standalone: true, moduleSystem: 'ES6'}))
.pipe(gulp.dest('dist'));
});
gulp.task('dist:clean', function (cb) {
del.sync(['./dist']);
cb();
});
gulp.task('dist:files', function () {
gulp.src([
'modules/**/*',
])
.pipe(gulp.dest('./dist'));
});
gulp.task('server', function () {
return server.run({
file: 'app.js'
});
});
gulp.task('default', ['server']);