forked from pablodenadai/angular2-seed-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.env.js
64 lines (54 loc) · 1.35 KB
/
gulpfile.env.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
'use strict';
process.env.NODE_ENV = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
process.env.PORT = process.env.PORT ? process.env.PORT : '8080';
let baseLibs = [
'node_modules/systemjs/dist/system-polyfills.js',
'node_modules/systemjs/dist/system.js',
'node_modules/es6-shim/es6-shim.js',
'node_modules/rxjs/bundles/Rx.js',
'node_modules/angular2/bundles/angular2-polyfills.js',
'node_modules/angular2/bundles/angular2.dev.js',
'node_modules/angular2/bundles/router.dev.js',
'node_modules/angular2/bundles/http.dev.js',
'node_modules/lodash/index.js'
];
var paths = {
typings: [
'node_modules/angular2/typings/browser.d.ts',
'typings/main.d.ts'
],
dev: {
libs: {
js: [
...baseLibs
// Add dev only libs here - eg 'node_modules/debug-lib/index.js'
]
}
},
prod: {
libs: {
js: [
...baseLibs
// Add prod only libs here - eg 'node_modules/analytics-lib/index.js'
]
}
},
test: {
libs: {
js: [
...baseLibs,
'node_modules/angular2/bundles/testing.dev.js',
'karma.shim.js'
]
}
}
};
module.exports = {
NODE_ENV: process.env.NODE_ENV,
PORT: process.env.PORT,
get isDev() { return this.NODE_ENV === 'development'; },
get isProd() { return this.NODE_ENV === 'production'; },
get paths() { return this.isDev ? paths.dev : paths.prod; },
test: paths.test,
typings: paths.typings
};