Skip to content

Commit

Permalink
Clean up yarn scripts to make more sense
Browse files Browse the repository at this point in the history
Fix GHAs to match build scripts
  • Loading branch information
Shaptic committed Apr 6, 2023
1 parent 0aa2cdd commit 3f894e2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: Install Depencencies
run: yarn install
run: yarn

- name: Test & Build
run: yarn preversion
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Install Dependencies
run: yarn install

- name: Build Node
run: yarn build && yarn build:prod
- name: Build All
run: yarn build:prod

- name: Run Node Tests
run: yarn test:node
Expand All @@ -36,4 +36,4 @@ jobs:
run: yarn build:browser:prod && yarn test:browser

- name: Run Linter
run: yarn tslint
run: yarn lint
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
"main": "./lib/index.js",
"types": "./types/index.d.ts",
"scripts": {
"build": "yarn build:node",
"build:node": "babel --out-dir lib/ src/",
"build": "yarn build:node && yarn build:browser",
"build:node": "babel --out-dir ./lib/ ./src/",
"build:browser": "webpack -c ./config/webpack.config.browser.js",
"build:prod": "cross-env NODE_ENV=production yarn build",
"build:node:prod": "cross-env NODE_ENV=production yarn build",
"build:browser:prod": "cross-env NODE_ENV=production yarn build:browser",
"build:all": "yarn build:node && yarn build:browser",
"build:all:prod": "yarn build:prod && yarn build:browser:prod",
"test": "yarn build && yarn test:node",
"build:prod": "cross-env NODE_ENV=production yarn build",
"test": "yarn build && yarn test:node && yarn test:browser",
"test:node": "nyc --nycrc-path ./config/.nycrc mocha --recursive",
"test:browser": "karma start ./config/karma.conf.js",
"test:all": "yarn test && yarn test:browser && yarn tslint",
"docs": "jsdoc -c ./config/.jsdoc.json --verbose",
"tslint": "dtslint --localTs node_modules/typescript/lib types/",
"preversion": "yarn clean && yarn pretty && yarn build:all:prod && yarn test:all",
"lint": "eslint -c ./config/.eslintrc.js src/ && dtslint --localTs node_modules/typescript/lib types/",
"preversion": "yarn clean && yarn pretty && yarn lint && yarn build:prod && yarn test",
"pretty": "prettier --config ./config/prettier.config.js --ignore-path ./config/.prettierignore --write './**/*.js'",
"prepare": "yarn build:all:prod",
"prepare": "yarn build:prod",
"clean": "rm -rf lib/ dist/ coverage/ .nyc_output/"
},
"mocha": {
Expand All @@ -38,6 +36,7 @@
},
"files": [
"/dist/*.js",
"/lib/**/*.js",
"/types/*.d.ts"
],
"husky": {
Expand Down

0 comments on commit 3f894e2

Please sign in to comment.