-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulp.config.js
59 lines (56 loc) · 1.26 KB
/
gulp.config.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
57
58
59
module.exports = function() {
var fs = require('fs');
var bowerrc = fs.readFileSync('./.bowerrc');
var src = './src/';
var srcApp = src + 'app/';
var srcSim = src + 'sim/';
var dist = './dist/';
var demo = './demo/';
var mainSim = 'CrowdSim.js';
var mainApp = 'CrowdSimApp.js';
var srcMainSim = srcSim + mainSim;
var srcMainApp = srcApp + mainApp;
var config = {
src: src,
srcApp: srcApp,
srcSim: srcSim,
dist: dist,
demo: demo,
mainSim: mainSim,
mainApp: mainApp,
srcMainSim: srcMainSim,
srcMainApp: srcMainApp,
sass: demo + 'sass/**/*.scss',
css: demo + 'css/',
fonts: demo + 'fonts/',
img: demo + 'img/',
index: demo + 'index.html',
lib: demo + 'js/lib/',
js: {
src: src + '**/*.js',
demo: demo + 'js/*.js',
lib: demo + 'js/lib/*.*',
dist: dist + '*.*'
},
bower: bowerrc,
doc: './doc',
report: './report/',
browserifySim: {
opts: {
paths: [srcSim],
entries: [srcMainSim],
debug: true
}
},
browserifyApp: {
opts: {
paths: [srcApp],
entries: [srcMainApp],
debug: true
},
browserifyExternal: 'CrowdSim'
},
browserifyExpose: mainSim.substring(0,mainSim.indexOf('.')) // to avoid CrowdSim lib being bundle into CrowdSimApp
};
return config;
};