-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmake.js
37 lines (34 loc) · 870 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
37
var path = require('path');
var Builder = require('systemjs-builder');
var name = 'draggable.module';
var builder = new Builder();
var config = {
baseURL: './dist',
transpiler: 'typescript',
typescriptOptions: {
module: 'cjs'
},
map: {
typescript: path.resolve('./node_modules/typescript/lib/typescript.js'),
'@angular': path.resolve('./node_modules/@angular'),
rxjs: path.resolve('./node_modules/rxjs')
},
paths:{
'*':'*.js',
'utils/*':'utils/*.js',
'node_modules/*': './node_modules/*'
},
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);
});