Skip to content

Commit 7c05aee

Browse files
committed
system js maker
1 parent 0678ae1 commit 7c05aee

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

make.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var path = require('path');
2+
var Builder = require('systemjs-builder');
3+
var name = 'draggable.module';
4+
5+
var builder = new Builder();
6+
var config = {
7+
baseURL: './dist',
8+
transpiler: 'typescript',
9+
typescriptOptions: {
10+
module: 'cjs'
11+
},
12+
map: {
13+
typescript: path.resolve('./node_modules/typescript/lib/typescript.js'),
14+
'@angular': path.resolve('./node_modules/@angular'),
15+
rxjs: path.resolve('./node_modules/rxjs')
16+
},
17+
paths:{
18+
'*':'*.js',
19+
'utils/*':'utils/*.js',
20+
'node_modules/*': './node_modules/*'
21+
},
22+
meta: {
23+
'./node_modules/@angular/*': { build: false },
24+
'./node_modules/rxjs/*': { build: false }
25+
},
26+
};
27+
28+
builder.config(config);
29+
30+
builder
31+
.bundle(name, path.resolve(__dirname, './bundles/', name + '.js'))
32+
.then(function() {
33+
console.log('Build complete.');
34+
})
35+
.catch(function(err) {
36+
console.log('Error', err);
37+
});

0 commit comments

Comments
 (0)