Use yarn to run scripts

This commit is contained in:
Nicolas Gallagher
2017-06-15 19:29:56 -07:00
parent 868ab55bac
commit 44d59f4996
2 changed files with 17 additions and 17 deletions
+12 -12
View File
@@ -28,25 +28,25 @@ yarn
To run flow: To run flow:
``` ```
npm run flow yarn flow
``` ```
To run the unit tests: To run the unit tests:
``` ```
npm run jest yarn jest
``` ```
…in watch mode: …in watch mode:
``` ```
npm run jest:watch yarn jest:watch
``` ```
To run all automated tests: To run all automated tests:
``` ```
npm test yarn test
``` ```
## Visual tests ## Visual tests
@@ -54,19 +54,19 @@ npm test
To run the interactive storybook: To run the interactive storybook:
``` ```
npm run docs:start yarn docs:start
``` ```
To generate a static build of the storybook: To generate a static build of the storybook:
``` ```
npm run docs:build yarn docs:build
``` ```
To run the performance benchmarks in a browser (opening `./benchmarks/index.html`): To run the performance benchmarks in a browser (opening `./benchmarks/index.html`):
``` ```
npm run benchmarks yarn benchmarks
``` ```
## Compile and build ## Compile and build
@@ -74,13 +74,13 @@ npm run benchmarks
To compile the source code to `dist`: To compile the source code to `dist`:
``` ```
npm run compile yarn compile
``` ```
To create a UMD bundle of the library: To create a UMD bundle of the library:
``` ```
npm run build yarn build
``` ```
### Pre-commit ### Pre-commit
@@ -88,14 +88,14 @@ npm run build
To format and lint code before commit: To format and lint code before commit:
``` ```
npm run precommit yarn precommit
``` ```
To format and lint the entire project: To format and lint the entire project:
``` ```
npm run fmt yarn fmt
npm run lint yarn lint
``` ```
### New Features ### New Features
+5 -5
View File
@@ -14,16 +14,16 @@
"compile": "del ./dist && mkdir dist && babel src -d dist --ignore **/__tests__", "compile": "del ./dist && mkdir dist && babel src -d dist --ignore **/__tests__",
"docs:build": "build-storybook -o ./docs/dist -c ./docs/storybook/.storybook", "docs:build": "build-storybook -o ./docs/dist -c ./docs/storybook/.storybook",
"docs:start": "start-storybook -p 9001 -c ./docs/storybook/.storybook --dont-track", "docs:start": "start-storybook -p 9001 -c ./docs/storybook/.storybook --dont-track",
"docs:publish": "npm run docs:build && git checkout gh-pages && rm -rf ./storybook && mv docs/dist storybook && git add -A && git commit -m \"Storybook deploy\" && git push origin gh-pages && git checkout -", "docs:publish": "yarn docs:build && git checkout gh-pages && rm -rf ./storybook && mv docs/dist storybook && git add -A && git commit -m \"Storybook deploy\" && git push origin gh-pages && git checkout -",
"flow": "flow", "flow": "flow",
"fmt": "find benchmarks docs src -name '*.js' | grep -v -E '(node_modules|dist)' | xargs npm run fmt:cmd", "fmt": "find benchmarks docs src -name '*.js' | grep -v -E '(node_modules|dist)' | xargs yarn fmt:cmd",
"fmt:cmd": "prettier --print-width=100 --single-quote --write", "fmt:cmd": "prettier --print-width=100 --single-quote --write",
"jest": "jest", "jest": "jest",
"jest:watch": "npm run test -- --watch", "jest:watch": "yarn test -- --watch",
"lint": "npm run lint:cmd -- benchmarks docs src", "lint": "yarn lint:cmd -- benchmarks docs src",
"lint:cmd": "eslint --fix --ignore-path .gitignore", "lint:cmd": "eslint --fix --ignore-path .gitignore",
"precommit": "lint-staged", "precommit": "lint-staged",
"release": "npm run lint && npm run test && npm run compile && npm run build && npm publish", "release": "yarn lint && yarn test && yarn compile && yarn build && npm publish",
"test": "flow && jest" "test": "flow && jest"
}, },
"babel": { "babel": {