Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
chore: add package script to configure examples (#3361)
Browse files Browse the repository at this point in the history
Because I keep copy/pasting the commands and it is tedious to do so.
  • Loading branch information
achingbrain authored Oct 29, 2020
1 parent 4da0e33 commit bb3db59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,7 @@ jobs:
script:
# Travis lets scripts continue even if previous steps fail: https://github.com/travis-ci/travis-ci/issues/1066
- npm run build -- --scope={ipfs-core,ipfs,ipfs-http-client,ipfs-message-port-*} &&
rm -rf node_modules packages/*/node_modules &&
npx json -I -f ./lerna.json -e "this.packages.push('examples/*')" &&
npx json -I -f ./lerna.json -e "this.command.bootstrap.nohoist = ['ipfs-css', 'tachyons']" &&
npm install &&
npm run configure-examples &&
npm run test -- --scope=example* --concurrency=1

- stage: release-rc
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
"clean": "lerna run clean",
"lint": "lerna run lint",
"dep-check": "lerna run dep-check",
"configure-examples": "run-s release:pre:add-examples release:pre:add-hoisted-modules release:pre:reinstall",
"release": "run-s release:pre:* release:publish docker:release release:post:*",
"release:pre:non-dirty-repo": "git diff --quiet",
"release:pre:update-contributors": "aegir release --lint=false --test=false --bump=false --build=false --changelog=false --commit=false --tag=false --push=false --ghrelease=false --docs=false --publish=false",
"release:pre:ignore-changes-to-lerna-config": "git update-index --assume-unchanged ./lerna.json",
"release:pre:build": "NODE_ENV=production npm run build -- --scope={ipfs-core,ipfs,ipfs-http-client,ipfs-message-port-*}",
"release:pre:add-examples": "json -I -f ./lerna.json -e \"this.packages.push('examples/*')\"",
"release:pre:add-hoisted-modules": "json -I -f ./lerna.json -e \"this.command.bootstrap.nohoist = ['ipfs-css', 'tachyons']\"",
"release:pre:add-examples": "json -I -f ./lerna.json -e \"this.packages.push('examples/*'); this.packages = [...new Set(this.packages)]\"",
"release:pre:add-hoisted-modules": "json -I -f ./lerna.json -e \"this.command.bootstrap.nohoist = ['ipfs-css', 'tachyons']; this.command.bootstrap.nohoist = [...new Set(this.command.bootstrap.nohoist)]\"",
"release:pre:reinstall": "rm -rf node_modules */*/node_modules package-lock.json */*/package-lock.json && npm i && rm -rf package-lock.json */*/package-lock.json",
"release:publish": "lerna publish",
"docker:release": "run-s docker:release:*",
Expand Down

0 comments on commit bb3db59

Please sign in to comment.