-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
58 lines (49 loc) · 1.35 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
48
49
50
51
52
53
54
55
56
//Generic dependencies
var del = require('del');
var fs = require('fs');
var path = require('path');
//Gulp dependencies
var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var gutil = require('gulp-util');
var runSequence = require('run-sequence');
//globals
global.dir = {
bootstrap: path.join(__dirname, 'node_modules', 'bootstrap-sass'),
client: path.join(__dirname, 'client'),
sources: path.join(__dirname, 'src'),
release: path.join(__dirname, 'release')
};
//create a task directly in gulpfile
gulp.task('clean', function () {
return function (done) {
del(global.dir.client, {
force: true,
dot: true
},
done);
};
});
//OR check all individual task-file in tasks folder, and create a gulp-task with it
var tasks = ['sound','html', 'scss', 'fonts', 'external-lib', 'external-plugins', 'image','js-build','release-assembly'];
tasks.forEach(function (task) {
gulp.task(task, require('./tasks/' + task));
});
//Default task : run a sequence of task
gulp.task('default',function(callback){
runSequence(
'sound',
'clean',
['image','html'],
'scss',
'fonts',
['external-lib', 'external-plugins'],
'js-build',
'release-assembly',
callback
);
});
//other tasks for demo
gulp.task('faketask', require('./tasks/faketask'));
gulp.task('watch-webfiles', require('./tasks/watch-webfiles'));