From 090f6fbde07013ebe60c15440d119bc37ff50b98 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Wed, 14 Mar 2018 14:55:08 +0100 Subject: [PATCH] chore: run yarn test on pre-commit hook --- .circleci/config.yml | 6 +++--- .circleci/deploy-docs.sh | 2 +- CONTRIBUTING.md | 2 +- docs/package.json | 2 +- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4796e20..b1c97f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,8 +46,8 @@ jobs: - attach_workspace: at: ~/react-native-paper - run: | - yarn run lint - yarn run flow + yarn lint + yarn flow unit-tests: <<: *defaults @@ -64,7 +64,7 @@ jobs: - attach_workspace: at: ~/react-native-paper - run: | - cd docs && yarn run build && cd .. + cd docs && yarn build && cd .. bash .circleci/comment-artifacts.sh - store_artifacts: path: docs/dist diff --git a/.circleci/deploy-docs.sh b/.circleci/deploy-docs.sh index 5403614..34ce775 100755 --- a/.circleci/deploy-docs.sh +++ b/.circleci/deploy-docs.sh @@ -27,7 +27,7 @@ cd .. rm -rf dist/**/* || exit 0 # Run our build script. -yarn run build +yarn build cd dist diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b78fe46..9e7ef30 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ You can learn how from this *free* series [How to Contribute to an Open Source P 5. In case of doubts, check out the current code. For example, we use the prop `icon` not `iconName`. -6. You can run `yarn run bootstrap` which will install all the dependencies in example & docs folder respectively. +6. You can run `yarn bootstrap` which will install all the dependencies in example & docs folder respectively. ## Running the example diff --git a/docs/package.json b/docs/package.json index dd1e5a4..7772dfd 100644 --- a/docs/package.json +++ b/docs/package.json @@ -7,7 +7,7 @@ "start": "babel-node index", "build": "babel-node index build", "clean": "del dist/", - "prestart": "yarn run clean" + "prestart": "yarn clean" }, "devDependencies": { "babel-cli": "^6.18.0", diff --git a/package.json b/package.json index fa9c240..5d0005a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "homepage": "https://callstack.github.io/react-native-paper", "scripts": { "commitmsg": "node ./scripts/validate-commit-message.js $GIT_PARAMS", - "precommit": "yarn run lint && yarn run flow", + "precommit": "yarn lint && yarn flow && yarn test", "flow": "flow", "lint": "eslint .", "test": "jest",