Skip to content

Commit 2e056f5

Browse files
committed
Merge pull request #30 from jkuri/master
feat(cli): compatible with angular cli using 'ng install'
2 parents 8d31112 + 250a81f commit 2e056f5

File tree

3 files changed

+49
-7
lines changed

3 files changed

+49
-7
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ coverage
1313
!karma-test-shim.js
1414
*.map
1515
*.d.ts
16+
!make.js
17+
18+
#################
19+
## Bundles
20+
#################
21+
bundles/
1622

1723
#################
1824
## JetBrains

make.js

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

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"test": "tsc && karma start",
66
"test-watch": "tsc && karma start --no-single-run --auto-watch",
77
"commit": "git-cz",
8-
"prepublish": "tsc",
8+
"prepublish": "tsc && node make.js",
99
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
1010
},
1111
"repository": {
@@ -35,23 +35,23 @@
3535
"zone.js": "~0.5.10"
3636
},
3737
"devDependencies": {
38+
"angular2": "~2.0.0-beta.0",
3839
"commitizen": "~2.4.6",
3940
"cz-conventional-changelog": "~1.1.4",
41+
"es6-promise": "~3.0.2",
42+
"es6-shim": "~0.33.3",
4043
"jasmine-core": "~2.3.4",
4144
"karma": "~0.13.15",
4245
"karma-chrome-launcher": "~0.2.2",
4346
"karma-firefox-launcher": "~0.1.7",
4447
"karma-jasmine": "~0.3.6",
4548
"karma-typescript-preprocessor": "0.0.21",
49+
"reflect-metadata": "0.1.2",
50+
"rxjs": "5.0.0-beta.0",
4651
"semantic-release": "~4.3.5",
4752
"systemjs": "~0.19.6",
53+
"systemjs-builder": "^0.15.6",
4854
"typescript": "~1.7.3",
49-
50-
"angular2": "~2.0.0-beta.0",
51-
"es6-promise": "~3.0.2",
52-
"es6-shim": "~0.33.3",
53-
"reflect-metadata": "0.1.2",
54-
"rxjs": "5.0.0-beta.0",
5555
"zone.js": "~0.5.10"
5656
},
5757
"czConfig": {

0 commit comments

Comments
 (0)