-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add AoT compilation with webpack (#215)
Added AoT/Webpack support and updates it to NativeScript 2.5 Fixes #213
- Loading branch information
Showing
18 changed files
with
320 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import url("~/platform.css"); | ||
@import url("./platform.css"); | ||
|
||
Page { | ||
font-size: 15; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// this import should be first in order to load some required settings (like globals and reflect-metadata) | ||
import { platformNativeScript } from "nativescript-angular/platform-static"; | ||
|
||
import { AppModuleNgFactory } from "./app.module.ngfactory"; | ||
|
||
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Resolve JavaScript classes that extend a Java class, and need to resolve | ||
// their JavaScript module from a bundled script. For example: | ||
// NativeScriptApplication, NativeScriptActivity, etc. | ||
// | ||
// This module gets bundled together with the rest of the app code and the | ||
// `require` calls get resolved to the correct bundling import call. | ||
// | ||
// At runtime the module gets loaded *before* the rest of the app code, so code | ||
// placed here needs to be careful about its dependencies. | ||
|
||
require("application"); | ||
require("ui/frame"); | ||
require("ui/frame/activity"); | ||
|
||
if (global.TNS_WEBPACK) { | ||
global.__requireOverride = function (name, dir) { | ||
if (name === "./tns_modules/application/application.js") { | ||
return require("application"); | ||
} else if (name === "./tns_modules/ui/frame/frame.js") { | ||
return require("ui/frame"); | ||
} else if (name === "./tns_modules/ui/frame/activity.js") { | ||
return require("ui/frame/activity"); | ||
} | ||
}; | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require("./vendor-platform"); | ||
|
||
require("reflect-metadata"); | ||
require("@angular/platform-browser"); | ||
require("@angular/core"); | ||
require("@angular/common"); | ||
require("@angular/forms"); | ||
require("@angular/http"); | ||
require("@angular/router"); | ||
|
||
require("nativescript-angular/platform-static"); | ||
require("nativescript-angular/forms"); | ||
require("nativescript-angular/router"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"removeComments": false, | ||
"noImplicitAny": false, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"types": [], | ||
"baseUrl": ".", | ||
"paths": { | ||
"ui/*": ["node_modules/tns-core-modules/ui/*"], | ||
"platform": ["node_modules/tns-core-modules/platform"], | ||
"image-source": ["node_modules/tns-core-modules/image-source"], | ||
"xml": ["node_modules/tns-core-modules/xml"], | ||
"xhr": ["node_modules/tns-core-modules/xhr"], | ||
"text": ["node_modules/tns-core-modules/text"], | ||
"data": ["node_modules/tns-core-modules/data"], | ||
"fetch": ["node_modules/tns-core-modules/fetch"], | ||
"trace": ["node_modules/tns-core-modules/trace"], | ||
"fps-meter": ["node_modules/tns-core-modules/fps-meter"], | ||
"color": ["node_modules/tns-core-modules/color"], | ||
"application-settings": ["node_modules/tns-core-modules/application-settings"], | ||
"http": ["node_modules/tns-core-modules/http"], | ||
"camera": ["node_modules/tns-core-modules/camera"], | ||
"console": ["node_modules/tns-core-modules/console"], | ||
"timer": ["node_modules/tns-core-modules/timer"], | ||
"utils": ["node_modules/tns-core-modules/utils"], | ||
"location": ["node_modules/tns-core-modules/location"], | ||
"file-system": ["node_modules/tns-core-modules/file-system"], | ||
"application": ["node_modules/tns-core-modules/application"], | ||
"image-asset": ["node_modules/tns-core-modules/image-asset"], | ||
"connectivity": ["node_modules/tns-core-modules/connectivity"], | ||
"globals": ["node_modules/tns-core-modules/globals"] | ||
|
||
} | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"platforms" | ||
], | ||
"angularCompilerOptions": { | ||
"skipMetadataEmit": true, | ||
"genDir": "./" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
}, | ||
"exclude": [ | ||
"node_modules", | ||
"platforms" | ||
"platforms", | ||
"**/*.aot.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var makeConfig = require("./webpack.common"); | ||
module.exports = makeConfig("android"); |
Oops, something went wrong.