Skip to content

Commit aefa8eb

Browse files
committedJun 6, 2019
docs(contribute): combines seperate sections for npm and yarn
previously there were seperate sections for npm and yarn commands, hence in this update those sections were combined into a single sections
1 parent 6b50c96 commit aefa8eb

File tree

1 file changed

+38
-62
lines changed

1 file changed

+38
-62
lines changed
 

‎.github/CONTRIBUTING.md

+38-62
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ Table of Contents
1010
- [Issues](#issues)
1111
- [Your first Contribution](#your-first-contribution)
1212
- [Setup](#setup)
13-
- [Using npm](#using-npm)
14-
- [Using yarn](#using-yarn)
1513
- [Running Tests](#running-tests)
16-
- [Using npm](#using-npm-1)
17-
- [Using yarn](#using-yarn-1)
1814
- [Editor Config](#editor-config)
1915
- [Dependencies](#dependencies)
2016
- [Branching Model](#branching-model)
@@ -60,42 +56,34 @@ In case you are suggesting a new feature, we will match your idea with our curre
6056
- Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
6157
- `git clone <your-clone-url> && cd webpack-cli`
6258

63-
### Using npm
64-
65-
- Install the dependencies and link them:
66-
67-
```bash
68-
npm install
69-
npm link
70-
npm link webpack-cli
71-
```
72-
73-
- Bootstrap all the submodules before building for the first time
74-
75-
```bash
76-
npm run bootstrap
77-
npm run build
78-
```
79-
80-
### Using yarn
81-
8259
- If you don't have yarn yet:
8360

8461
```bash
8562
npm install -g yarn
8663
```
8764

88-
- Install the dependencies and link them
65+
* Install the dependencies and link them:
8966

9067
```bash
68+
#npm
69+
npm install
70+
npm link
71+
npm link webpack-cli
72+
73+
#yarn
9174
yarn
9275
yarn link
9376
yarn link webpack-cli
9477
```
9578

96-
- Bootstrap all the submodules before building for the first time
79+
* Bootstrap all the submodules before building for the first time
9780

9881
```bash
82+
#npm
83+
npm run bootstrap
84+
npm run build
85+
86+
#yarn
9987
yarn bootstrap
10088
yarn build
10189
```
@@ -107,76 +95,64 @@ In case you are suggesting a new feature, we will match your idea with our curre
10795
- Run all the tests with:
10896

10997
```bash
98+
#npm
11099
npm run test
100+
101+
#yarn
102+
yarn test
111103
```
112104

113105
- Run CLI tests with:
114106

115107
```bash
108+
#npm
116109
npm run test:cli
110+
111+
#yarn
112+
yarn test:cli`
117113
```
118114

119115
- Run tests of all packages:
120116

121117
```bash
118+
#npm
122119
npm run test:packages
120+
121+
#yarn
122+
yarn test:packages
123123
```
124124

125-
- Test a single CLI test case (must run from root of the poject):
125+
- Test a single CLI test case:
126+
127+
> Must run from root of the poject
126128

127129
```bash
130+
#npm
128131
npx jest path/to/my-test.js
132+
133+
#yarn
134+
yarn jest path/to/my-test.js
129135
```
130136

131137
- You can also install jest globally and run tests without npx:
132138

133139
```bash
140+
#npm
134141
npm i -g jest
135142
jest path/to/my-test.js
136-
```
137143
138-
- You can run the linters:
139-
140-
```bash
141-
npm run lint
142-
```
143-
144-
### Using yarn
145-
146-
- Run all the tests with:
147-
148-
```bash
149-
yarn test
150-
```
151-
152-
- Run CLI tests with:
153-
154-
```bash
155-
yarn test:cli`
156-
```
157-
158-
- Run tests of all packages:
159-
160-
```bash
161-
yarn test:packages
162-
```
163-
164-
- Test a single CLI test case (must run from root of the poject):
165-
166-
```bash
167-
yarn jest path/to/my-test.js
168-
```
169-
170-
- You can also install jest globally and run tests:
171-
172-
```bash
144+
#yarn
173145
yarn global add jest
174146
jest path/to/my-test.js
175147
```
176148

177149
- You can run the linters:
178150

179151
```bash
152+
#npm
153+
npm run lint
154+
155+
#yarn
180156
yarn lint
181157
```
182158

0 commit comments

Comments
 (0)
Please sign in to comment.