Skip to content

Commit

Permalink
chore(scripts): simplify yarn scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Dec 11, 2019
1 parent 2022b3a commit 2b8d461
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
# Run tests in parallel
- stage: test
script: yarn check:licenses
- script: yarn test:lint-js
- script: yarn test:unit --runInBand
- script: yarn check:security
- script: yarn test:lint
- script: yarn test:unit:ci
# Upload coverage reports to Codecov
after_success: yarn coverage:upload -t ${CODECOV_TOKEN}
after_success: yarn coverage-upload -t ${CODECOV_TOKEN}
- stage: publish
script: skip
# Publish package to NPM
Expand Down
41 changes: 19 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,31 @@
],
"scripts": {
"commit": "git-cz",
"fix": "yarn fix:eslint",
"fix:eslint": "foundry run eslint --fix --quiet src/**/**/*.js",
"test": "yarn test:lint-js && yarn test:unit",
"test:lint-js": "foundry run eslint --cache --quiet \"src/**/*.js\"",
"test:lint-js:watch": "onchange \"src/**/*.js\" -- yarn test:lint-js",
"test:unit": "jest --coverage --silent",
"test:unit:watch": "yarn test:unit:output --watch",
"test:unit:output": "jest --json --outputFile=jest-test-results.json",
"start": "start-storybook -p 6006 -s .storybook/public",
"create-component": "foundry run plop component",
"static-styles": "cross-env BABEL_ENV=static babel-node ./scripts/static-styles/cli.js",
"prestart": "yarn test:unit:output",
"start": "start-storybook -p 6006 -s .storybook/public",
"build": "yarn build:storybook && yarn build:stylesheets",
"build": "rm -rf lib && yarn build:cjs && yarn build:es",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir lib --ignore *.spec.js,*.story.js,*.docs.mdx",
"build:es": "cross-env BABEL_ENV=es babel src --out-dir lib/es --ignore *.spec.js,*.story.js,*.docs.mdx",
"build:docs": "yarn build:storybook && yarn build:stylesheets",
"prebuild:storybook": "yarn test:unit:output",
"build:storybook": "build-storybook -c .storybook -o dist -s .storybook/public",
"build:stylesheets": "mkdir -p dist/static && yarn static-styles --global --filePath=./dist/static/circuit-ui-v1.css",
"build:js": "yarn clean:js && yarn build:js:cjs && yarn build:js:es",
"build:js:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir lib --ignore *.spec.js,*.story.js,*.docs.mdx",
"build:js:es": "cross-env BABEL_ENV=es babel src --out-dir lib/es --ignore *.spec.js,*.story.js,*.docs.mdx",
"clean:js": "rimraf lib",
"predeploy": "rm -rf ./dist && yarn build && cp ./src/CNAME ./dist/CNAME",
"deploy": "gh-pages -d dist",
"prerelease": "yarn build:js",
"release": "semantic-release",
"coverage:upload": "codecov",
"prepublishOnly": "yarn build:js",
"test": "yarn test:lint && yarn test:unit",
"test:lint": "foundry run eslint --cache --quiet \"src/**/*.js\"",
"test:lint:fix": "yarn test:lint --fix",
"test:lint:watch": "onchange \"src/**/*.js\" -- yarn test:lint",
"test:unit": "jest --silent",
"test:unit:watch": "jest --watch",
"test:unit:output": "jest --json --outputFile=jest-test-results.json",
"test:unit:ci": "jest --coverage --runInBand",
"check:security": "audit-ci --critical",
"check:licenses": "license-checker --production --summary --failOn=GPLv3"
"check:licenses": "license-checker --production --summary --failOn=GPLv3",
"coverage-upload": "codecov",
"predeploy": "rm -rf ./dist && yarn build:docs && cp ./src/CNAME ./dist/CNAME",
"deploy": "gh-pages -d dist",
"prepublishOnly": "yarn build",
"release": "semantic-release"
},
"config": {
"commitizen": {
Expand Down

0 comments on commit 2b8d461

Please sign in to comment.