Skip to content

Commit

Permalink
Chore: Automatically install example dependencies (#164)
Browse files Browse the repository at this point in the history
Previously, CI was explicitly running the `install-examples` script as
its own step. This was also necessary but not documented locally, so
`git clone; npm install; npm test` would show a couple failures when the
examples inherited the wrong ESLint dependency. The examples'
dependencies should now be installed automatically when running `npm
install` locally without any arguments.

Originally reported in #163.
  • Loading branch information
btmills authored Nov 26, 2020
1 parent 2749b4d commit d30c50f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Packages
run: npm install && npm run install-examples
run: npm install
env:
CI: true
- name: Test
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"linter"
],
"scripts": {
"install-examples": "for example in examples/*; do (cd \"$example\" && npm install); done",
"lint": "eslint --ext js,md .",
"prepare": "for example in examples/*; do (cd \"$example\" && npm install); done",
"test": "npm run lint && npm run test-cov",
"test-cov": "nyc _mocha -- -c tests/{examples,lib}/**/*.js",
"generate-release": "npm run install-examples && eslint-generate-release",
"generate-alpharelease": "npm run install-examples && eslint-generate-prerelease alpha",
"generate-betarelease": "npm run install-examples && eslint-generate-prerelease beta",
"generate-rcrelease": "npm run install-examples && eslint-generate-prerelease rc",
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"publish-release": "eslint-publish-release"
},
"main": "index.js",
Expand Down

0 comments on commit d30c50f

Please sign in to comment.