2018-03-24 19:44:11 +01:00
|
|
|
# Setup
|
|
|
|
|
2018-04-04 12:28:03 +02:00
|
|
|
At webpack we use `yarn` to execute commands.
|
|
|
|
|
|
|
|
If you already have `yarn` installed, do: `yarn setup`. This will complete all required steps.
|
|
|
|
|
|
|
|
If not, do: `npm run setup`, the setup will also install `yarn` for you.
|
|
|
|
|
|
|
|
That's all.
|
|
|
|
|
|
|
|
## Setup manually
|
|
|
|
|
2018-05-07 08:25:49 +02:00
|
|
|
### Setup your local webpack repository
|
2018-03-24 19:44:11 +01:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://github.com/webpack/webpack.git
|
|
|
|
cd webpack
|
|
|
|
npm install -g yarn
|
2018-03-26 16:07:45 +02:00
|
|
|
yarn
|
2018-03-24 19:44:11 +01:00
|
|
|
yarn link
|
|
|
|
yarn link webpack
|
|
|
|
```
|
|
|
|
|
2018-05-07 16:43:09 +02:00
|
|
|
### To run the entire test suite use
|
2018-03-24 19:44:11 +01:00
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn test
|
2018-04-04 12:28:03 +02:00
|
|
|
```
|
2018-05-07 08:25:49 +02:00
|
|
|
|
2018-07-09 22:48:12 +02:00
|
|
|
### To run only integration tests use
|
2018-05-07 16:43:09 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn test:integration
|
|
|
|
```
|
|
|
|
|
|
|
|
or in watch mode
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn test:integration --watch
|
|
|
|
```
|
|
|
|
|
|
|
|
### To run only unit tests use
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn test:unit
|
|
|
|
```
|
|
|
|
|
|
|
|
or in watch mode
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn test:unit --watch
|
|
|
|
```
|
|
|
|
|
2018-06-26 19:57:17 +02:00
|
|
|
### To update Jest snapshots use
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn test:update-snapshots
|
|
|
|
```
|
|
|
|
|
2018-05-07 16:43:09 +02:00
|
|
|
### To run code formatter (prettier) run
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn pretty
|
|
|
|
```
|
|
|
|
|
|
|
|
### To run all linters use
|
|
|
|
|
|
|
|
This performs linting on:
|
|
|
|
|
|
|
|
* eslint (code-lint script)
|
2019-02-18 09:22:43 +01:00
|
|
|
* schema + dependencies (jest-lint script)
|
2018-05-07 16:43:09 +02:00
|
|
|
* types (type-lint script)
|
2019-02-18 09:22:43 +01:00
|
|
|
* format + generated files (special-lint script)
|
2018-05-07 16:43:09 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn lint
|
|
|
|
```
|
|
|
|
|
|
|
|
### To run only the typechecker use
|
2018-05-07 08:25:49 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn type-lint
|
|
|
|
```
|
|
|
|
|
2018-05-07 16:43:09 +02:00
|
|
|
or incremental (in watch mode)
|
2018-05-07 08:25:49 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn type-lint --watch
|
|
|
|
```
|
2019-08-20 14:18:09 +02:00
|
|
|
|
|
|
|
### To update all examples use
|
|
|
|
|
|
|
|
```bash
|
|
|
|
yarn build:examples
|
|
|
|
```
|
|
|
|
|
2019-09-02 17:47:28 +02:00
|
|
|
### To update a specific example use
|
2019-08-20 14:18:09 +02:00
|
|
|
|
|
|
|
```bash
|
2019-09-02 17:47:28 +02:00
|
|
|
cd examples/<path to example>
|
2019-08-20 14:18:09 +02:00
|
|
|
node build.js
|
|
|
|
```
|