Skip to content

Commit

Permalink
Merge pull request #768 from misterdev/docs/contributing-formatting
Browse files Browse the repository at this point in the history
docs(contributing): improve formatting
  • Loading branch information
evenstensberg committed Mar 10, 2019
2 parents 6fee805 + 1042cb2 commit e2c9dd7
Showing 1 changed file with 69 additions and 35 deletions.
104 changes: 69 additions & 35 deletions .github/CONTRIBUTING.md
Expand Up @@ -32,15 +32,15 @@ In case you are suggesting a new feature, we will match your idea with our curre
* Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
* `git clone <your-clone-url> && cd webpack-cli`

### Setup with npm
### Using npm

* Install the dependencies and link them:

```bash
npm install
npm link
npm link webpack-cli
```
```bash
npm install
npm link
npm link webpack-cli
```

* Bootstrap all the submodules before building for the first time

Expand All @@ -49,32 +49,21 @@ npm link webpack-cli
npm run build
```

* Run all the tests with:
- `npm run test`

* To test a single CLI (flag) test case:
- `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js`

* To test a single CLI (other type of) test case:
- `npx jest path/to/my-test.js`
- You can also install jest globally and run tests without npx:
- `npm i -g jest`
- If you have jest installed globally:
- `jest path/to/my-test.js`
### Using yarn

* To test linting:
- `npm run lint && npm run tslint`

### Setup with yarn
* If you don't have yarn yet:
- `npm install -g yarn`

```bash
npm install -g yarn
```

* Install the dependencies and link them

```bash
yarn
yarn link
yarn link webpack-cli
```
```bash
yarn
yarn link
yarn link webpack-cli
```

* Bootstrap all the submodules before building for the first time

Expand All @@ -83,17 +72,62 @@ yarn link webpack-cli
yarn build
```


## Testing

### Using npm

* Run all the tests with:
- `yarn test`

```bash
npm run test
```

* To test a single CLI (flag) test case:
- `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js`
* Test a single CLI test case:

```bash
npx jest path/to/my-test.js
```

* To test a single CLI (other type of) test case:
- `yarn jest path/to/my-test.js`
* You can also install jest globally and run tests without npx:

* To test linting:
- `yarn lint && yarn tslint`
```bash
npm i -g jest
jest path/to/my-test.js
```

* You can run the linters:

```bash
npm run lint && npm run tslint
```

### Using yarn

* Run all the tests with:

```bash
yarn test
```

* Test a single CLI test case:

```bash
yarn jest path/to/my-test.js
```

* You can also install jest globally and run tests:

```bash
yarn global add jest
jest path/to/my-test.js
```

* You can run the linters:

```bash
yarn lint && yarn tslint
```

## Editor Config

Expand Down

0 comments on commit e2c9dd7

Please sign in to comment.