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

Commit d842c67

Browse files
authored
docs: update Contributing guide and deprecate old verify script (#409)
* chore: deprecate ns-verify-bundle script as it's no longer used in CI * docs: update Contributing guide
1 parent 87680b6 commit d842c67

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

CONTRIBUTING.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ Before starting, make yourself familiar with the `nativescript-dev-webpack`'s [d
1111

1212
The repository contains several ingredients:
1313
* `installer.js` - combination of postinstall scripts for adding or removing webpack configurations and necessary dependecies when installing the plugin.
14-
* `prepublish` - [Webpack config](https://webpack.js.org/concepts/configuration/) snippets used for generating webpack configuration templates. The latter are generated with the npm's `prepublishOnly` script. **If you want to modify the distributed webpack configurations - that's the right place to do it.**
15-
* `templates` - webpack config templates for different types of projects - NativeScript with JavaScript, NativeScript with TypeScript and NativeScript Angular projects.
16-
* `plugins` - several [Webpack plugins](https://webpack.js.org/concepts/plugins/) necessary for bundling NativeScript applications.
17-
* `snapshot/android` - tools used with the `NativeScriptSnapshot` plugin for generating V8 Heap Snapshots.
18-
* `nativescript-target` - configuration of a [Webpack deployment target](https://webpack.js.org/concepts/targets/) for building NativeScript applications.
19-
* `bin` - helper node/npm scripts for projects using the plugin.
20-
* `bin/ns-bundle` - node script used for bundling the project with Webpack and building the native Android/iOS application with NativeScript CLI.
14+
* `templates/` - webpack config templates for different types of projects - NativeScript with JavaScript, NativeScript with TypeScript and NativeScript Angular projects.
15+
* `plugins/` - several [Webpack plugins](https://webpack.js.org/concepts/plugins/) necessary for bundling NativeScript applications.
16+
* `snapshot/android/` - tools used with the `NativeScriptSnapshot` plugin for generating V8 Heap Snapshots.
17+
* `nativescript-target/` - configuration of a [Webpack deployment target](https://webpack.js.org/concepts/targets/) for building NativeScript applications.
18+
* `bin/` - helper node/npm scripts for projects using the plugin.
19+
* `demo/` - resides several NativeScript applications, testing different scenarios. You can execute each app's tests by navigating to its directory and running `npm run e2e -- --runType nameOfRuntype`. For more information on runTypes, check out the [nativescript-dev-appium](https://github.com/NativeScript/nativescript-dev-appium#custom-appium-capabilities) plugin.
20+
2121
## Setup
22+
23+
> Note that you need npm 5+ for local development of the plugin.
2224
1. [Fork](https://help.github.com/articles/fork-a-repo/) and clone the GitHub repository:
2325
```bash
2426
git clone https://github.com/your-username/nativescript-dev-webpack.git
@@ -35,32 +37,30 @@ The repository contains several ingredients:
3537
git checkout -b <my-fix-branch> master
3638
```
3739

38-
4. Install devDependencies:
40+
4. Install dependencies:
3941
```bash
4042
npm install
4143
```
4244

43-
You are good to go! The plugin is written in plain JavaScript. You're strongly encouraged to follow the official NativeScript [Coding Conventions](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md) and to use ES features available in NodeJS v6. If unsure, check on [node.green](http://node.green/).
45+
The last command also runs `npm prepare` which compiles the TypeScript files in the plugin.
46+
You are good to go! You're strongly encouraged to follow the official NativeScript [Coding Conventions](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md) and to use ES features available in NodeJS v6. If unsure, check on [node.green](http://node.green/).
4447
4548
## Testing locally
4649
50+
There are three apps in the repository, located in
4751
1. Create a new NativeScript project with NativeScript CLI:
4852
``` bash
4953
tns create testapp # pass --ng/--tsc for Angular/TypeScript app
5054
```
5155
52-
2. Install your local copy of the plugin using either `npm install` or `npm link`.
56+
2. Install your local copy of the plugin.
5357
``` bash
54-
npm install/link /path/to/repo/nativescript-dev-webpack
58+
npm install /path/to/repo/nativescript-dev-webpack
5559
```
5660
57-
3. The first command will copy the files, while the second one will create a symlink to the local directory. Because of the symlink, all the changes you make in `node_modules/nativescript-dev-webpack` will be 'synced' with `/path/to/repo/nativescript-dev-webpack` and vice-versa.
58-
59-
4. Make sure to force-update the project's configuration files if it's already using Webpack.
61+
3. Make sure to force-update the project's configuration files if it's already using Webpack.
6062
``` bash
61-
rm -rf node_modules platforms webpack.* app/vendor*
62-
./node_modules/.bin/update-ns-webpack # force update dependecies and add the new configurations
63-
npm i # install the new dependencies
63+
./node_modules/.bin/update-ns-webpack --deps --configs
6464
```
6565
6666
## Reporting Bugs

bin/ns-verify-bundle

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
console.error("The ns-verify-bundle script is deprecated!")
4+
35
const path = require("path");
46
const fs = require("fs");
57

0 commit comments

Comments
 (0)