From 37b132d96ff7869ba624d1efac780fdc4b2aac5e Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Wed, 4 Jul 2018 11:34:07 +0300 Subject: [PATCH 1/5] chore(TypeScriptApp): update .gitignore file --- demo/TypeScriptApp/.gitignore | 2 ++ demo/TypeScriptApp/app/app.android.css | 1 - demo/TypeScriptApp/app/app.ios.css | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 demo/TypeScriptApp/app/app.android.css delete mode 100644 demo/TypeScriptApp/app/app.ios.css diff --git a/demo/TypeScriptApp/.gitignore b/demo/TypeScriptApp/.gitignore index 0d71390f..5cd54bcf 100644 --- a/demo/TypeScriptApp/.gitignore +++ b/demo/TypeScriptApp/.gitignore @@ -1,5 +1,7 @@ app/**/*.js e2e/**/*.js +app/app.android.css +app/app.ios.css app/main-page.android.css app/main-page.ios.css \ No newline at end of file diff --git a/demo/TypeScriptApp/app/app.android.css b/demo/TypeScriptApp/app/app.android.css deleted file mode 100644 index c55b85fe..00000000 --- a/demo/TypeScriptApp/app/app.android.css +++ /dev/null @@ -1 +0,0 @@ -@import url(/Users/vchimev/Work/git/nativescript-dev-webpack/demo/TypeScriptApp/node_modules/nativescript-theme-core/css/core.light.css);ActionBar{background-color:#7F9}.app-class{background-color:#7F9} diff --git a/demo/TypeScriptApp/app/app.ios.css b/demo/TypeScriptApp/app/app.ios.css deleted file mode 100644 index 2a1f4e39..00000000 --- a/demo/TypeScriptApp/app/app.ios.css +++ /dev/null @@ -1 +0,0 @@ -@import url(/Users/vchimev/Work/git/nativescript-dev-webpack/demo/TypeScriptApp/node_modules/nativescript-theme-core/css/core.light.css);ActionBar{background-color:#999}.app-class{background-color:#999} From 52870167e12ecc4edc411e696a16544fac2f326b Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Wed, 4 Jul 2018 14:39:36 +0300 Subject: [PATCH 2/5] chore(AngularApp): update to nativescript-angular@next --- demo/AngularApp/package.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/demo/AngularApp/package.json b/demo/AngularApp/package.json index 1a6756ea..5efd8dd9 100644 --- a/demo/AngularApp/package.json +++ b/demo/AngularApp/package.json @@ -13,20 +13,20 @@ } }, "dependencies": { - "@angular/common": "~6.0.0", - "@angular/compiler": "~6.0.0", - "@angular/core": "~6.0.0", - "@angular/forms": "~6.0.0", - "@angular/http": "~6.0.0", - "@angular/platform-browser": "~6.0.0", - "@angular/platform-browser-dynamic": "~6.0.0", - "@angular/router": "~6.0.0", - "nativescript-angular": "~6.0.0", + "@angular/common": "~6.1.0-beta.3", + "@angular/compiler": "~6.1.0-beta.3", + "@angular/core": "~6.1.0-beta.3", + "@angular/forms": "~6.1.0-beta.3", + "@angular/http": "~6.1.0-beta.3", + "@angular/platform-browser": "~6.1.0-beta.3", + "@angular/platform-browser-dynamic": "~6.1.0-beta.3", + "@angular/router": "~6.1.0-beta.3", + "nativescript-angular": "next", "nativescript-theme-core": "~1.0.2", "reflect-metadata": "~0.1.8", - "rxjs": "~6.0.0-beta.1", + "rxjs": "~6.0.0 || >=6.1.0", "tns-core-modules": "next", - "zone.js": "^0.8.4" + "zone.js": "^0.8.26" }, "devDependencies": { "@ngtools/webpack": "6.1.0-rc.0", @@ -53,4 +53,4 @@ "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", "compile-tests": "tsc -p e2e --watch" } -} +} \ No newline at end of file From 61c38c9f8b1fb4fad97d55667bbe8e33fd15be44 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Wed, 4 Jul 2018 14:55:59 +0300 Subject: [PATCH 3/5] chore(demos): update to nativescript-dev-sass@next --- demo/AngularApp/package.json | 2 +- demo/JavaScriptApp/package.json | 2 +- demo/TypeScriptApp/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/AngularApp/package.json b/demo/AngularApp/package.json index 5efd8dd9..1da4511f 100644 --- a/demo/AngularApp/package.json +++ b/demo/AngularApp/package.json @@ -44,7 +44,7 @@ "mocha-junit-reporter": "^1.13.0", "mocha-multi": "^0.11.0", "nativescript-dev-appium": "next", - "nativescript-dev-sass": "^1.3.5", + "nativescript-dev-sass": "next", "nativescript-dev-typescript": "next", "nativescript-dev-webpack": "file:../..", "typescript": "~2.7.2" diff --git a/demo/JavaScriptApp/package.json b/demo/JavaScriptApp/package.json index 32543aa0..6abc0c4f 100644 --- a/demo/JavaScriptApp/package.json +++ b/demo/JavaScriptApp/package.json @@ -28,7 +28,7 @@ "mocha-junit-reporter": "^1.13.0", "mocha-multi": "^0.11.0", "nativescript-dev-appium": "next", - "nativescript-dev-sass": "^1.3.5", + "nativescript-dev-sass": "next", "nativescript-dev-webpack": "file:../..", "node-sass": "^4.7.1" }, diff --git a/demo/TypeScriptApp/package.json b/demo/TypeScriptApp/package.json index c4ecf688..951b9172 100644 --- a/demo/TypeScriptApp/package.json +++ b/demo/TypeScriptApp/package.json @@ -28,7 +28,7 @@ "mocha-junit-reporter": "^1.13.0", "mocha-multi": "^0.11.0", "nativescript-dev-appium": "next", - "nativescript-dev-sass": "^1.3.5", + "nativescript-dev-sass": "next", "nativescript-dev-typescript": "next", "nativescript-dev-webpack": "file:../..", "typescript": "~2.7.2" From 03ae6f23030df6c91de7b74ca5d20bc52e3cbd02 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Thu, 5 Jul 2018 14:08:45 +0300 Subject: [PATCH 4/5] chore(demos): add preinstall script Refer `nativescript-dev-webpack` from a local `.tgz` file. --- demo/AngularApp/package.json | 5 +++-- demo/JavaScriptApp/package.json | 3 ++- demo/TypeScriptApp/package.json | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/demo/AngularApp/package.json b/demo/AngularApp/package.json index 1da4511f..55b23513 100644 --- a/demo/AngularApp/package.json +++ b/demo/AngularApp/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@ngtools/webpack": "6.1.0-rc.0", - "@angular/compiler-cli": "~6.1.0-beta.1", + "@angular/compiler-cli": "~6.1.0-beta.3", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -46,10 +46,11 @@ "nativescript-dev-appium": "next", "nativescript-dev-sass": "next", "nativescript-dev-typescript": "next", - "nativescript-dev-webpack": "file:../..", + "nativescript-dev-webpack": "file:../../nativescript-dev-webpack.tgz", "typescript": "~2.7.2" }, "scripts": { + "preinstall": "cd ../../ && npm install && npm pack && cp nativescript-dev-webpack*.tgz nativescript-dev-webpack.tgz", "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", "compile-tests": "tsc -p e2e --watch" } diff --git a/demo/JavaScriptApp/package.json b/demo/JavaScriptApp/package.json index 6abc0c4f..351e71ac 100644 --- a/demo/JavaScriptApp/package.json +++ b/demo/JavaScriptApp/package.json @@ -29,10 +29,11 @@ "mocha-multi": "^0.11.0", "nativescript-dev-appium": "next", "nativescript-dev-sass": "next", - "nativescript-dev-webpack": "file:../..", + "nativescript-dev-webpack": "file:../../nativescript-dev-webpack.tgz", "node-sass": "^4.7.1" }, "scripts": { + "preinstall": "cd ../../ && npm install && npm pack && cp nativescript-dev-webpack*.tgz nativescript-dev-webpack.tgz", "e2e": "mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json" } } diff --git a/demo/TypeScriptApp/package.json b/demo/TypeScriptApp/package.json index 951b9172..f0cc7a7b 100644 --- a/demo/TypeScriptApp/package.json +++ b/demo/TypeScriptApp/package.json @@ -30,10 +30,11 @@ "nativescript-dev-appium": "next", "nativescript-dev-sass": "next", "nativescript-dev-typescript": "next", - "nativescript-dev-webpack": "file:../..", + "nativescript-dev-webpack": "file:../../nativescript-dev-webpack.tgz", "typescript": "~2.7.2" }, "scripts": { + "preinstall": "cd ../../ && npm install && npm pack && cp nativescript-dev-webpack*.tgz nativescript-dev-webpack.tgz", "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", "compile-tests": "tsc -p e2e --watch" } From f68427acdcb100c7dd04bbc101b99cea62022d24 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Tue, 17 Jul 2018 17:10:26 +0300 Subject: [PATCH 5/5] chore(demos): rename preinstall to setup script Update `CONTRIBUTIN.md` file. --- CONTRIBUTING.md | 13 +++++++------ demo/AngularApp/package.json | 8 ++++---- demo/JavaScriptApp/package.json | 4 ++-- demo/TypeScriptApp/package.json | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c349cd8..7cb707e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,20 +62,21 @@ You are good to go! You're strongly encouraged to follow the official NativeScri NOTE: There are three test apps in the repository, located in the `/demo` directory. The steps below describe how to run the tests for the `AngularApp`, but the same approach can be used to run any other `e2e` tests. -1. Navigate to `demo/AngularApp` +1. Navigate to `demo/AngularApp`. ``` bash cd demo/AngularApp ``` -2. Install dependencies. This also installs your local copy of the nativescript-angular plugin. - ``` bash - npm install +2. Install your local copy of the `nativescript-dev-webpack` plugin. + ```bash + npm run setup ``` + 3. Make sure to have an emulator set up or connect a physical Android/iOS device. -4. Build the app for Android or iOS +4. Build the app for Android or iOS. ``` bash - tns run android/ios + tns run android/ios --bundle ``` 5. Install [appium](http://appium.io/) globally. diff --git a/demo/AngularApp/package.json b/demo/AngularApp/package.json index 55b23513..9c8ac61b 100644 --- a/demo/AngularApp/package.json +++ b/demo/AngularApp/package.json @@ -29,8 +29,8 @@ "zone.js": "^0.8.26" }, "devDependencies": { - "@ngtools/webpack": "6.1.0-rc.0", "@angular/compiler-cli": "~6.1.0-beta.3", + "@ngtools/webpack": "6.1.0-rc.0", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -46,12 +46,12 @@ "nativescript-dev-appium": "next", "nativescript-dev-sass": "next", "nativescript-dev-typescript": "next", - "nativescript-dev-webpack": "file:../../nativescript-dev-webpack.tgz", + "nativescript-dev-webpack": "next", "typescript": "~2.7.2" }, "scripts": { - "preinstall": "cd ../../ && npm install && npm pack && cp nativescript-dev-webpack*.tgz nativescript-dev-webpack.tgz", + "setup": "npm pack ../../ && npm i -D nativescript-dev-webpack*.tgz", "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", "compile-tests": "tsc -p e2e --watch" } -} \ No newline at end of file +} diff --git a/demo/JavaScriptApp/package.json b/demo/JavaScriptApp/package.json index 351e71ac..c9ccd161 100644 --- a/demo/JavaScriptApp/package.json +++ b/demo/JavaScriptApp/package.json @@ -29,11 +29,11 @@ "mocha-multi": "^0.11.0", "nativescript-dev-appium": "next", "nativescript-dev-sass": "next", - "nativescript-dev-webpack": "file:../../nativescript-dev-webpack.tgz", + "nativescript-dev-webpack": "next", "node-sass": "^4.7.1" }, "scripts": { - "preinstall": "cd ../../ && npm install && npm pack && cp nativescript-dev-webpack*.tgz nativescript-dev-webpack.tgz", + "setup": "npm pack ../../ && npm i -D nativescript-dev-webpack*.tgz", "e2e": "mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json" } } diff --git a/demo/TypeScriptApp/package.json b/demo/TypeScriptApp/package.json index f0cc7a7b..d3729f51 100644 --- a/demo/TypeScriptApp/package.json +++ b/demo/TypeScriptApp/package.json @@ -30,11 +30,11 @@ "nativescript-dev-appium": "next", "nativescript-dev-sass": "next", "nativescript-dev-typescript": "next", - "nativescript-dev-webpack": "file:../../nativescript-dev-webpack.tgz", + "nativescript-dev-webpack": "next", "typescript": "~2.7.2" }, "scripts": { - "preinstall": "cd ../../ && npm install && npm pack && cp nativescript-dev-webpack*.tgz nativescript-dev-webpack.tgz", + "setup": "npm pack ../../ && npm i -D nativescript-dev-webpack*.tgz", "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", "compile-tests": "tsc -p e2e --watch" }