Skip to content

Commit 5b269dd

Browse files
committed
Added support for AOT compilation.
- Using this library on AOT compiled applications requires these changes.
1 parent e90272e commit 5b269dd

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
/lib
66
/src/typings/
77
/coverage/
8+
/aot

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/.idea/
55
/node_modules/
66
/src/typings/
7+
/aot
78

89
.codeclimate.yml
910
devrelease.sh
@@ -12,6 +13,7 @@ devrelease.sh
1213
.gitignore
1314
karma.conf.js
1415
karma-test-shim.js
16+
systemjs.config.js
1517
.npmignore
1618
release.sh
1719
.travis.yml

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
"description": "DataTable component for Angular2 framework",
55
"main": "index.js",
66
"scripts": {
7-
"watch": "tsc -p src -w",
87
"prebuild": "rm -rf lib",
9-
"build": "tsc -p src",
8+
"build": "ngc -p src",
109
"start": "http-server -c-1 -o -p 8875 .",
1110
"pretest": "npm run build",
1211
"test": "karma start karma.conf.js",
@@ -36,8 +35,12 @@
3635
},
3736
"homepage": "https://github.com/mariuszfoltak/angular2-datatable#readme",
3837
"devDependencies": {
39-
"@angular/compiler": "^2.0.0",
40-
"@angular/platform-browser-dynamic": "^2.0.0",
38+
"@angular/core": "^2.1.0",
39+
"@angular/compiler": "^2.1.0",
40+
"@angular/common": "^2.1.0",
41+
"@angular/platform-browser": "^2.1.0",
42+
"@angular/platform-browser-dynamic": "^2.1.0",
43+
"@angular/compiler-cli": "^2.1.0",
4144
"core-js": "^2.4.1",
4245
"http-server": "^0.9.0",
4346
"jasmine-core": "^2.4.1",

src/tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@
1616
"dom",
1717
"es2015"
1818
]
19+
},
20+
"angularCompilerOptions": {
21+
"genDir": "../aot",
22+
"skipMetadataEmit": false
1923
}
2024
}

0 commit comments

Comments
 (0)