1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00

Standardize on yarn shorthand rather than yarn run (#1599)

This commit is contained in:
Zach Schneider 2018-02-04 16:25:21 -05:00 committed by GitHub
parent b26bed1c88
commit 1654a4113c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View File

@ -21,8 +21,8 @@ env:
script:
# Run bootstrap first so that the proper workspaces links are created.
- yarn run bootstrap
- yarn bootstrap
# Build all of the packages so they are resolvable by each other.
- yarn run build
- yarn build
# Run testing or linting depending on the environment.
- yarn run $TEST_TYPE
- yarn $TEST_TYPE

View File

@ -57,26 +57,26 @@ To run the tests, you need to have the Slate repository cloned to your computer.
```
yarn install
yarn run bootstrap
yarn bootstrap
```
Then run the tests with:
```
yarn run test
yarn test
```
To keep the source rebuilding on every file change, you need to run an additional watching command in a separate process:
```
yarn run watch
yarn watch
```
If you're not using the examples in-browser (and only running the tests against the watched source), you can instead run `yarn watch:packages` for faster rebuilds.
If you need to debug something, you can add a `debugger` line to the source, and then run `yarn run test debug`.
If you need to debug something, you can add a `debugger` line to the source, and then run `yarn test debug`.
If you only want to run a specific test or tests, you can run `yarn run test --fgrep="slate-react rendering"` flag which will filter the tests being run by grepping for the string in each test.
If you only want to run a specific test or tests, you can run `yarn test --fgrep="slate-react rendering"` flag which will filter the tests being run by grepping for the string in each test.
## Running Benchmarks
@ -87,14 +87,14 @@ To do that, stash your changes and save the benchmarks:
```
git stash
yarn run benchmark:save
yarn benchmark:save
```
Then once the reference has been saved, unstash your changes and run the benchmarks to see a comparison:
```
git stash pop
yarn run benchmark
yarn benchmark
```
There will be some subtle changes in iteration speed always, but the comparison reporter will highlight any changes that seem meaningful. You can run `benchmark` multiple times to ensure the speed up persists.

View File

@ -26,13 +26,13 @@ To get the examples running on your machine, you need to have the Slate reposito
```
yarn install
yarn run bootstrap
yarn bootstrap
```
Then start the watcher and examples server:
```
yarn run watch
yarn watch
```
Now you can open up `http://localhost:8080/dev.html` in your browser and you'll see the examples site. Any changes you make to the source code will be immediately reflected when you refresh the page.