mirror of
https://github.com/Lissy93/happy-app.git
synced 2021-05-12 19:52:18 +03:00
Started implementing AOT
This commit is contained in:
@@ -97,7 +97,7 @@ https://github.com/Lissy93/happy-app
|
||||
|
||||
<!-- The actual application! -->
|
||||
<script>
|
||||
System.import("./index.js");
|
||||
System.import("./main-jit.js");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import {
|
||||
platformBrowserDynamic
|
||||
} from "@angular/platform-browser-dynamic";
|
||||
|
||||
import {enableProdMode} from '@angular/core';
|
||||
|
||||
import {
|
||||
AppModule
|
||||
} from "./app.module";
|
||||
|
||||
// enableProdMode(); // UNCOMMENT THIS TO ENABLE PRODUCTION MODE
|
||||
// TODO find better way of just commenting/ uncommenting that ^^
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
5
client/dev/main-aot.ts
Normal file
5
client/dev/main-aot.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// import { platformBrowser } from '@angular/platform-browser';
|
||||
//
|
||||
// import { AppModuleNgFactory } from './app.module';
|
||||
//
|
||||
// platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
||||
6
client/dev/main-jit.ts
Normal file
6
client/dev/main-jit.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
// enableProdMode(); // UNCOMMENT THIS TO ENABLE PRODUCTION MODE
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
@@ -12,18 +12,21 @@
|
||||
"test-server": "mocha 'tests/server/**/*_test.js' --recursive --check-leaks --reporter min --compilers js:babel-register",
|
||||
"coverage-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- 'tests/server/**/*_test.js' --compilers js:babel-register",
|
||||
"coveralls-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- 'tests/server/**/*_test.js' --compilers js:babel-register --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
|
||||
"populate-with-sample-data": "gulp delete-database && gulp populate-sample-data"
|
||||
"populate-with-sample-data": "gulp delete-database && gulp populate-sample-data",
|
||||
"ngc": "node_modules/.bin/ngc -p tsconfig-aot.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^4.1.1",
|
||||
"@angular/common": "^4.1.1",
|
||||
"@angular/compiler": "^4.1.1",
|
||||
"@angular/compiler-cli": "^4.4.5",
|
||||
"@angular/core": "^4.1.1",
|
||||
"@angular/forms": "^4.1.1",
|
||||
"@angular/http": "^4.1.1",
|
||||
"@angular/material": "^2.0.0-beta.3",
|
||||
"@angular/platform-browser": "^4.1.1",
|
||||
"@angular/platform-browser-dynamic": "^4.1.1",
|
||||
"@angular/platform-server": "^4.4.5",
|
||||
"@angular/router": "^4.0.0",
|
||||
"angulartics2": "^2.4.0",
|
||||
"babel-preset-es2015": "^6.1.18",
|
||||
|
||||
26
tsconfig-aot.json
Normal file
26
tsconfig-aot.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"lib": ["es2015", "dom"],
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"typeRoots": [
|
||||
"./node_modules/@types/"
|
||||
]
|
||||
},
|
||||
|
||||
"files": [
|
||||
"src/app/app.module.ts",
|
||||
"src/main.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"genDir": "aot",
|
||||
"skipMetadataEmit" : true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user