-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
executable file
·47 lines (37 loc) · 1.37 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var buildAppTaskList = [
'templates',
'compile-ng-app',
'stylus',
'clean-temp'
];
var buildWithLibs = [
'templates',
'compile-ng-app',
'stylus',
'clean-temp',
'build-bower-libs'
];
function getTask(task) {
return require('./gulp_tasks/' + task)(gulp, plugins);
}
gulp.task('angular-templates', getTask('angular-templates'));
gulp.task('copy-index', getTask('copy-index'));
gulp.task('templates', ['angular-templates', 'copy-index']);
gulp.task('compile-ng-app', getTask('compile-ng-app'));
gulp.task('compile-bower-scripts', getTask('compile-bower-scripts'));
gulp.task('stylus', getTask('stylus'));
gulp.task('compile-bower-styles', getTask('compile-bower-styles'));
gulp.task('copy-bootstrap-fonts', getTask('copy-bootstrap-fonts'));
gulp.task('clean-temp', ['angular-templates', 'compile-ng-app'], getTask('clean-temp'));
gulp.task('build', buildAppTaskList);
gulp.task('build-all', buildWithLibs);
gulp.task('build-bower-libs', ['compile-bower-scripts', 'compile-bower-styles', 'copy-bootstrap-fonts'])
gulp.task('watch', buildAppTaskList, function() {
gulp.watch('./app/index.html', ['copy-index']);
gulp.watch('./app/**/*.jade', ['angular-templates']);
gulp.watch('./app/**/*.styl', ['stylus']);
gulp.watch('./app/**/*.js', ['compile-ng-app']);
});
gulp.task('default', ['build']);