diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef62f1206b..45961556c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,13 +42,9 @@ Before you submit a Pull Request, consider the following guidelines. ```bash git clone git@github.com:NativeScript/nativescript-cli.git ``` -* Initialize the submodule. +* Run the setup script. This will initialize the git submodule, install the node dependencies and build with grunt. ```bash - git submodule init -``` -* Fetch data from the submodule. -```bash - git submodule update + npm run setup ``` * Make your changes in a new `git` branch. We use the Gitflow branching model so you will have to branch from our master branch. ```bash @@ -57,15 +53,15 @@ Before you submit a Pull Request, consider the following guidelines. * Create your patch and include appropriate test cases. * Build your changes locally. ```bash - grunt + ./node_modules/.bin/grunt ``` * Ensure all the tests pass. ```bash - grunt test + ./node_modules/.bin/grunt test ``` * Ensure that your code passes the linter. ```bash - grunt lint + ./node_modules/.bin/grunt lint ``` * Commit your changes and create a descriptive commit message (the commit message is used to generate release notes). ```bash diff --git a/README.md b/README.md index e541561e25..bc6df4c4d3 100644 --- a/README.md +++ b/README.md @@ -431,9 +431,7 @@ How to Build ``` git clone https://github.com/NativeScript/nativescript-cli cd nativescript-cli -git submodule update --init -npm install -grunt +npm run setup ``` To use the locally built CLI instead `tns` you can call `PATH_TO_CLI_FOLDER/bin/tns`. For example: diff --git a/package.json b/package.json index b503a07774..25d61a9b50 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "main": "./lib/nativescript-cli-lib.js", "scripts": { + "setup": "git submodule update --init && npm i --ignore-scripts && ./node_modules/.bin/grunt", "test": "node test-scripts/istanbul.js", "postinstall": "node postinstall.js", "preuninstall": "node preuninstall.js",