Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 63ecb92

Browse files
Making Travis happy
1 parent 1467bb3 commit 63ecb92

File tree

7 files changed

+39
-16
lines changed

7 files changed

+39
-16
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ matrix:
4747
before_install:
4848
- gem install cocoapods
4949
- pod repo update
50-
script: npm run build-ios-bundle
50+
script: tns build ios --bundle
5151
- language: android
5252
os: linux
5353
env:
5454
- Webpack="Android"
5555
jdk: oraclejdk8
5656
before_install: nvm install 6.10.3
57-
script: npm run build-android-bundle
57+
script: tns build android --bundle
5858
- stage: "Build"
5959
env:
6060
- BuildAndroid="25"

demo/app/bundle-config.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
if ((<any>global).TNS_WEBPACK) {
2-
require("tns-core-modules/bundle-entry-points");
1+
if (global.TNS_WEBPACK) {
2+
// registers tns-core-modules UI framework modules
3+
require("bundle-entry-points");
34

4-
global.registerModule("main-page", () => require("./main-page"));
5+
// register application modules
6+
// This will register each `page` postfixed xml, css, js, ts, scss etc. in the app/ folder
7+
const context = require.context("~/", true, /(page|fragment)\.(xml|css|js|ts|scss|less|sass)$/);
8+
global.registerWebpackModules(context);
59
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
require("application");
22
if (!global["__snapshot"]) {
3-
/*
4-
In case snapshot generation is enabled these modules will get into the bundle but will not be required/evaluated.
5-
The snapshot webpack plugin will add them to the tns-java-classes.js bundle file. This way, they will be evaluated on app start as early as possible.
6-
*/
3+
// In case snapshot generation is enabled these modules will get into the bundle
4+
// but will not be required/evaluated.
5+
// The snapshot webpack plugin will add them to the tns-java-classes.js bundle file.
6+
// This way, they will be evaluated on app start as early as possible.
77
require("ui/frame");
88
require("ui/frame/activity");
99
}

demo/app/vendor-platform.ios.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// There is a bug in angular: https://github.com/angular/angular-cli/pull/8589/files
2+
// Legendary stuff, its webpack plugin pretty much doesn't work with empty TypeScript files in v1.8.3
3+
void 0;

demo/app/vendor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// Snapshot the ~/app.css and the theme
2+
const application = require("application");
3+
require("ui/styling/style-scope");
4+
const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/);
5+
global.registerWebpackModules(appCssContext);
6+
application.loadAppCss();
7+
18
require("./vendor-platform");
29

310
require("bundle-entry-points");

demo/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,30 @@
1515
"tns-core-modules": "~3.4.0"
1616
},
1717
"devDependencies": {
18-
"@types/jasmine": "^2.6.3",
18+
"@types/jasmine": "~2.8.0",
1919
"awesome-typescript-loader": "~3.1.3",
2020
"babel-traverse": "6.12.0",
2121
"babel-types": "6.11.1",
2222
"babylon": "6.8.4",
2323
"copy-webpack-plugin": "~4.0.1",
24+
"css-loader": "~0.28.7",
2425
"extract-text-webpack-plugin": "~3.0.0",
2526
"filewalker": "0.1.2",
26-
"jasmine-core": "^2.5.2",
27+
"jasmine-core": "~2.8.0",
2728
"karma": "^1.7.1",
2829
"karma-jasmine": "^1.1.0",
2930
"karma-nativescript-launcher": "^0.4.0",
3031
"lazy": "1.0.11",
3132
"nativescript-css-loader": "~0.26.0",
3233
"nativescript-dev-typescript": "libs",
33-
"nativescript-dev-webpack": "^0.7.3",
34+
"nativescript-dev-webpack": "~0.9.0",
35+
"nativescript-worker-loader": "~0.8.1",
3436
"raw-loader": "~0.5.1",
3537
"resolve-url-loader": "~2.1.0",
36-
"tns-platform-declarations": "~3.4.0",
38+
"tns-platform-declarations": "^3.4.0",
3739
"tslint": "~5.4.3",
3840
"typescript": "~2.4.0",
39-
"webpack": "~3.2.0",
41+
"webpack": "~3.8.1",
4042
"webpack-bundle-analyzer": "^2.8.2",
4143
"webpack-sources": "~1.0.1"
4244
},

demo/tsconfig.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"skipLibCheck": true,
1111
"lib": [
1212
"es6",
13-
"dom"
13+
"dom",
14+
"es2015.iterable"
1415
],
1516
"pretty": true,
1617
"allowUnreachableCode": false,
@@ -21,9 +22,15 @@
2122
"noImplicitReturns": true,
2223
"noImplicitUseStrict": false,
2324
"noFallthroughCasesInSwitch": true,
25+
"typeRoots": [
26+
"./node_modules/@types",
27+
"./node_modules"
28+
],
29+
"types": [],
2430
"baseUrl": ".",
2531
"paths": {
2632
"*": [
33+
"./node_modules/tns-core-modules/*",
2734
"./node_modules/*"
2835
]
2936
}
@@ -33,4 +40,4 @@
3340
"platforms"
3441
],
3542
"compileOnSave": false
36-
}
43+
}

0 commit comments

Comments
 (0)