Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

chore: prepare 1.1.0 release #1023

Merged
merged 5 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ NOTE: There are three test apps in the repository, located in the `/demo` direct

4. Build the app for Android or iOS.
``` bash
tns run android/ios --bundle
tns run android/ios
```

5. Install [appium](http://appium.io/) globally.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ For more details, see the [NativeScript docs for building with webpack](http://d
```sh
$ npm install --save-dev nativescript-dev-webpack

$ tns run android --bundle
$ tns run android
or
$ tns run ios --bundle
$ tns run ios
```

## Contribute
Expand Down
2 changes: 1 addition & 1 deletion bin/ns-bundle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

console.error("Using npm run scripts is no longer supported. Use CLI commands and pass the --bundle flag instead.\nExample:\ntns build android --bundle")
console.error("Using npm run scripts is no longer supported. Use CLI commands instead.\nExample:\ntns build android")
process.exit(1);
22 changes: 11 additions & 11 deletions demo/AngularApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@
}
},
"dependencies": {
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/common": "8.2.0",
"@angular/compiler": "8.2.0",
"@angular/core": "8.2.0",
"@angular/forms": "8.2.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"@angular/platform-browser": "8.2.0",
"@angular/platform-browser-dynamic": "8.2.0",
"@angular/router": "8.2.0",
"nativescript-angular": "next",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.3.3",
"tns-core-modules": "next",
"zone.js": "^0.8.4"
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.0",
"@ngtools/webpack": "8.0.0",
"@angular/compiler-cli": "8.2.0",
"@ngtools/webpack": "8.2.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
Expand All @@ -44,7 +44,7 @@
"nativescript-dev-appium": "next",
"nativescript-dev-webpack": "next",
"node-sass": "^4.12.0",
"typescript": "~3.4.5"
"typescript": "~3.5.3"
},
"scripts": {
"setup": "npm pack ../../ && npm i -D nativescript-dev-webpack*.tgz",
Expand Down
5 changes: 2 additions & 3 deletions demo/AngularApp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "src",
appResourcesPath = "App_Resources",

Expand Down Expand Up @@ -318,4 +317,4 @@ module.exports = env => {
}

return config;
};
};
5 changes: 2 additions & 3 deletions demo/JavaScriptApp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",

Expand Down Expand Up @@ -257,4 +256,4 @@ module.exports = env => {


return config;
};
};
5 changes: 2 additions & 3 deletions demo/TypeScriptApp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",

Expand Down Expand Up @@ -288,4 +287,4 @@ module.exports = env => {


return config;
};
};
4 changes: 2 additions & 2 deletions dependencyManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ function getRequiredDeps(packageJson) {
}

const deps = {
"@angular/compiler-cli": "8.0.0",
"@angular/compiler-cli": "8.2.0",
};

if (!dependsOn(packageJson, "@angular-devkit/build-angular")) {
deps["@ngtools/webpack"] = "8.0.0";
deps["@ngtools/webpack"] = "8.2.0";
}

return deps;
Expand Down
9 changes: 6 additions & 3 deletions hmr/hmr-update.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import * as hot from "../hot";
import { knownFolders } from "tns-core-modules/file-system";
import { knownFolders, path, File } from "tns-core-modules/file-system";

declare const __webpack_require__: any;

export function hmrUpdate() {
const applicationFiles = knownFolders.currentApp();
const currentAppFolder = knownFolders.currentApp();
const latestHash = __webpack_require__["h"]();
return hot(latestHash, filename => applicationFiles.getFile(filename));
return hot(latestHash, filename => {
const fullFilePath = path.join(currentAppFolder.path, filename);
return File.exists(fullFilePath) ? currentAppFolder.getFile(filename) : null;
});
}
4 changes: 4 additions & 0 deletions hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ function update(latestHash, options) {

function getNextHash(hash, getFileContent) {
const file = getFileContent(`${hash}.hot-update.json`);
if (!file) {
return Promise.resolve(hash);
}

return file.readText().then(hotUpdateContent => {
if (hotUpdateContent) {
const manifest = JSON.parse(hotUpdateContent);
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-dev-webpack",
"version": "1.0.3",
"version": "1.1.0",
"main": "index",
"description": "",
"homepage": "http://www.telerik.com",
Expand Down Expand Up @@ -46,7 +46,7 @@
"generate-android-snapshot": "./bin/generate-android-snapshot"
},
"dependencies": {
"@angular-devkit/core": "8.0.0",
"@angular-devkit/core": "8.2.0",
"clean-webpack-plugin": "~1.0.0",
"copy-webpack-plugin": "~4.6.0",
"css-loader": "~2.1.1",
Expand Down Expand Up @@ -75,9 +75,9 @@
"webpack-sources": "~1.3.0"
},
"devDependencies": {
"@angular/compiler": "8.0.0",
"@angular/compiler-cli": "8.0.0",
"@ngtools/webpack": "8.0.0",
"@angular/compiler": "8.2.0",
"@angular/compiler-cli": "8.2.0",
"@ngtools/webpack": "8.2.0",
"@types/jasmine": "^3.3.7",
"@types/loader-utils": "^1.1.3",
"@types/node": "^10.12.12",
Expand All @@ -89,6 +89,6 @@
"jasmine-spec-reporter": "^4.2.1",
"proxyquire": "2.1.0",
"tns-core-modules": "next",
"typescript": "~3.4.0"
"typescript": "~3.5.3"
}
}
3 changes: 1 addition & 2 deletions templates/webpack.angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "src",
appResourcesPath = "App_Resources",

Expand Down
3 changes: 1 addition & 2 deletions templates/webpack.javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",

Expand Down
3 changes: 1 addition & 2 deletions templates/webpack.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",

Expand Down
3 changes: 1 addition & 2 deletions templates/webpack.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ module.exports = env => {

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",

Expand Down