-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.js
36 lines (33 loc) · 783 Bytes
/
make.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
var pkg = require('./package.json');
var path = require('path');
var Builder = require('systemjs-builder');
var name = pkg.name;
var builder = new Builder();
var config = {
baseURL: '.',
transpiler: 'typescript',
typescriptOptions: {
module: 'cjs'
},
map: {
typescript: './node_modules/typescript/lib/typescript.js',
'@angular': './node_modules/@angular',
rxjs: './node_modules/rxjs'
},
paths: {
'*': '*.js'
},
meta: {
'./node_modules/@angular/*': { build: false },
'./node_modules/rxjs/*': { build: false }
}
};
builder.config(config);
builder
.bundle(name, path.resolve(__dirname, 'bundles/', name + '.js'))
.then(function() {
console.log('Build complete.');
})
.catch(function(err) {
console.log('Error', err);
});