-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp.config.js
95 lines (90 loc) · 2.2 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
var historyApiFallback = require('connect-history-api-fallback')
module.exports = function () {
var root = '';
var app = root + 'app/';
var test = root + 'test/';
var testHelper = test + 'test-helpers/';
var e2e = test + 'e2e/';
var assets = root + 'assets/';
var assetsPath = {
styles: assets + 'styles/',
images: assets + 'images/',
fonts: assets + 'fonts/'
};
var index = root + 'index.html';
var tsFiles = [
app + '**/!(*.spec)+(.ts)'
];
var tsTestFiles = {
unit: [app + '**/*.spec.ts'],
e2e: [e2e + '**/*.ts'],
helper: [testHelper + '**/*.ts']
};
var build = {
path: 'build/',
app: 'build/app/',
fonts: 'build/fonts',
assetPath: 'build/assets/',
assets: {
lib: {
js: 'lib.js',
css: 'lib.css'
}
}
};
var report = {
path: 'report/'
};
var browserSync = {
dev: {
port: 3000,
server: {
baseDir: './',
middleware: [historyApiFallback()]
},
files: [
"index.html",
"systemjs.conf.js",
"assets/styles/main.css",
"app/**/*.js",
"app/**/*.html"
]
},
prod: {
port: 3001,
server: {
baseDir: './' + build.path,
middleware: [historyApiFallback()]
}
}
};
var e2eConfig = {
seleniumTarget: 'http://127.0.0.1:3000'
};
var systemJs = {
builder: {
normalize: true,
minify: true,
mangle: true,
globalDefs: { DEBUG: false }
}
};
var config = {
root: root,
app: app,
test: test,
testHelper: testHelper,
e2e: e2e,
e2eConfig: e2eConfig,
assets: assets,
index: index,
build: build,
report: report,
assetsPath: assetsPath,
tsFiles: tsFiles,
tsTestFiles: tsTestFiles,
browserSync: browserSync,
systemJs: systemJs
};
return config;
};