Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add script for installing peer dependecies See yarnpkg/yarn#1503 * Add test configuration * Fix eslint errors and warnings * Add workflow to CircleCI config * Use node 10 image * Remove `yarn` from test script
- Loading branch information
Showing
7 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/node:10 | ||
|
||
steps: | ||
- checkout | ||
- restore_cache: | ||
name: Restoring Yarn Cache | ||
keys: | ||
# Find a cache corresponding to this specific package.json checksum. | ||
- v-yarn-{{ checksum "package.json" }} | ||
# Find the most recent cache regardless of package.json checksum. | ||
- v-yarn- | ||
- run: | ||
name: Installing All Dependencies | ||
command: yarn install-peer | ||
- save_cache: | ||
name: Saving Yarn Cache | ||
key: v-yarn-{{ checksum "package.json" }} | ||
paths: | ||
- node_modules | ||
- run: | ||
name: Running Tests | ||
command: yarn test | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
extractPeerDeps.js | ||
getPeerScript.js | ||
src | ||
webpack.config.js | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// returns a yarn command to re-add peer dependencies which as a side effect installs them into node_modules | ||
const deps = require('./package').peerDependencies | ||
const res = [] | ||
for (let dep in deps) { | ||
res.push(`"${dep}@${deps[dep]}"`) | ||
} | ||
|
||
const depStr = res.join(' ') | ||
if (depStr.length) { | ||
process.stdout.write(`yarn add --peer --no-lockfile ${depStr}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters