Skip to content

Commit

Permalink
workflow: alert user working on repo if not using yarn (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
limichange authored Jun 9, 2020
1 parent 958b6c8 commit bccae16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"dev-compiler": "npm-run-all --parallel \"dev template-explorer\" serve",
"serve": "serve",
"open": "open http://localhost:5000/packages/template-explorer/local.html"
"open": "open http://localhost:5000/packages/template-explorer/local.html",
"preinstall": "node ./scripts/checkYarn.js"
},
"types": "test-dts/index.d.ts",
"tsd": {
Expand Down
5 changes: 5 additions & 0 deletions scripts/checkYarn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if (!/yarn\.js$/.test(process.env.npm_execpath || '')) {
console.warn(
"\u001b[33mYou don't seem to be using yarn. This could produce unexpected results.\u001b[39m"
)
}

0 comments on commit bccae16

Please sign in to comment.