Skip to content

Commit 1042cb2

Browse files
committed
docs(contributing): refactor & formatting
1 parent 47fcd7f commit 1042cb2

File tree

1 file changed

+42
-29
lines changed

1 file changed

+42
-29
lines changed

.github/CONTRIBUTING.md

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In case you are suggesting a new feature, we will match your idea with our curre
3232
* Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
3333
* `git clone <your-clone-url> && cd webpack-cli`
3434

35-
### Setup with npm
35+
### Using npm
3636

3737
* Install the dependencies and link them:
3838

@@ -49,68 +49,81 @@ In case you are suggesting a new feature, we will match your idea with our curre
4949
npm run build
5050
```
5151

52-
* Run all the tests with:
52+
### Using yarn
53+
54+
* If you don't have yarn yet:
5355

5456
```bash
55-
npm run test
57+
npm install -g yarn
5658
```
57-
58-
* To test a single CLI (flag) test case:
5959

60+
* Install the dependencies and link them
61+
6062
```bash
61-
BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js`
63+
yarn
64+
yarn link
65+
yarn link webpack-cli
6266
```
6367

64-
* To test a single CLI (other type of) test case:
65-
- `npx jest path/to/my-test.js`
66-
- You can also install jest globally and run tests without npx:
67-
- `npm i -g jest`
68-
- If you have jest installed globally:
69-
- `jest path/to/my-test.js`
68+
* Bootstrap all the submodules before building for the first time
7069

71-
* To test linting:
7270
```bash
73-
npm run lint && npm run tslint
71+
yarn bootstrap
72+
yarn build
7473
```
7574

76-
### Setup with yarn
77-
* If you don't have yarn yet:
75+
76+
## Testing
77+
78+
### Using npm
79+
80+
* Run all the tests with:
7881

7982
```bash
80-
npm install -g yarn
83+
npm run test
8184
```
85+
86+
* Test a single CLI test case:
8287

83-
* Install the dependencies and link them
88+
```bash
89+
npx jest path/to/my-test.js
90+
```
91+
92+
* You can also install jest globally and run tests without npx:
8493

8594
```bash
86-
yarn
87-
yarn link
88-
yarn link webpack-cli
95+
npm i -g jest
96+
jest path/to/my-test.js
8997
```
9098

91-
* Bootstrap all the submodules before building for the first time
99+
* You can run the linters:
92100

93101
```bash
94-
yarn bootstrap
95-
yarn build
102+
npm run lint && npm run tslint
96103
```
97104

105+
### Using yarn
106+
98107
* Run all the tests with:
99108

100109
```bash
101110
yarn test
102111
```
103112

104-
* To test a single CLI (flag) test case:
113+
* Test a single CLI test case:
105114

106115
```bash
107-
BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js
116+
yarn jest path/to/my-test.js
108117
```
118+
119+
* You can also install jest globally and run tests:
109120

110-
* To test a single CLI (other type of) test case:
111-
- `yarn jest path/to/my-test.js`
121+
```bash
122+
yarn global add jest
123+
jest path/to/my-test.js
124+
```
112125

113-
* To test linting:
126+
* You can run the linters:
114127

115128
```bash
116129
yarn lint && yarn tslint

0 commit comments

Comments
 (0)