Skip to content

Commit 27e937b

Browse files
authored
Merge pull request #3373 from NativeScript/vlaeva/contributing-docs
docs: update build instructions in readme and contributing guide
2 parents bab1251 + 1774c67 commit 27e937b

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

CONTRIBUTING.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@ Before you submit a Pull Request, consider the following guidelines.
4242
```bash
4343
git clone [email protected]:NativeScript/nativescript-cli.git
4444
```
45-
* Initialize the submodule.
45+
* Run the setup script. This will initialize the git submodule, install the node dependencies and build with grunt.
4646
```bash
47-
git submodule init
48-
```
49-
* Fetch data from the submodule.
50-
```bash
51-
git submodule update
47+
npm run setup
5248
```
5349
* Make your changes in a new `git` branch. We use the <a href="http://nvie.com/posts/a-successful-git-branching-model/">Gitflow branching model</a> so you will have to branch from our master branch.
5450
```bash
@@ -57,15 +53,15 @@ Before you submit a Pull Request, consider the following guidelines.
5753
* Create your patch and include appropriate test cases.
5854
* Build your changes locally.
5955
```bash
60-
grunt
56+
./node_modules/.bin/grunt
6157
```
6258
* Ensure all the tests pass.
6359
```bash
64-
grunt test
60+
./node_modules/.bin/grunt test
6561
```
6662
* Ensure that your code passes the linter.
6763
```bash
68-
grunt lint
64+
./node_modules/.bin/grunt lint
6965
```
7066
* Commit your changes and create a descriptive commit message (the commit message is used to generate release notes).
7167
```bash

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,7 @@ How to Build
431431
```
432432
git clone https://github.com/NativeScript/nativescript-cli
433433
cd nativescript-cli
434-
git submodule update --init
435-
npm install
436-
grunt
434+
npm run setup
437435
```
438436

439437
To use the locally built CLI instead `tns` you can call `PATH_TO_CLI_FOLDER/bin/tns`. For example:

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"main": "./lib/nativescript-cli-lib.js",
1212
"scripts": {
13+
"setup": "git submodule update --init && npm i --ignore-scripts && ./node_modules/.bin/grunt",
1314
"test": "node test-scripts/istanbul.js",
1415
"postinstall": "node postinstall.js",
1516
"preuninstall": "node preuninstall.js",

0 commit comments

Comments
 (0)