forked from RenovoSolutions/TypeScript-Angular-Utilities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
system.config.js
77 lines (68 loc) · 1.69 KB
/
system.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
var map = {
'@angular': 'node_modules/@angular',
'angular': 'node_modules/angular',
'angular-mocks': 'node_modules/angular-mocks/angular-mocks',
'angular2-uuid': 'node_modules/angular2-uuid',
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js',
'lodash': 'node_modules/lodash/index',
'moment': 'node_modules/moment/moment',
'moment-timezone': 'node_modules/moment-timezone/builds/moment-timezone-with-data.min',
'ng-wig': 'node_modules/ng-wig',
'rl-async-testing': 'node_modules/rl-async-testing',
'rl-http': 'node_modules/rl-http',
'rxjs': 'node_modules/rxjs',
};
var angularPackageNames = [
'core',
'compiler',
'common',
'platform-browser',
'platform-browser-dynamic',
'http',
];
var defaultPackages = [
'rl-async-testing',
'rl-http',
];
var meta = {
'jquery': {
build: false,
},
'angular': {
build: false,
},
};
var packages = {
'source': {
defaultExtension: 'js',
},
'node_modules': {
defaultExtension: 'js',
},
'angular2-uuid': {
main: 'index.js',
},
'rxjs': {
main: 'Rx.js',
},
'angular': {
main: 'index.js',
},
};
function setAngularPackage(packageName) {
map[`@angular/${packageName}`] = `node_modules/@angular/${packageName}/bundles/${packageName}.umd.js`;
}
function setAngularTestingPackage(packageName) {
map[`@angular/${packageName}/testing`] = `node_modules/@angular/${packageName}/bundles/${packageName}-testing.umd.js`;
}
function setDefaultPackage(packageName) {
packages[packageName] = { main: 'index.js' };
}
angularPackageNames.forEach(setAngularPackage);
angularPackageNames.forEach(setAngularTestingPackage);
defaultPackages.forEach(setDefaultPackage);
System.config({
meta: meta,
map: map,
packages: packages,
});