Skip to content

Commit bccae16

Browse files
authored
workflow: alert user working on repo if not using yarn (#1237)
1 parent 958b6c8 commit bccae16

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
1717
"dev-compiler": "npm-run-all --parallel \"dev template-explorer\" serve",
1818
"serve": "serve",
19-
"open": "open http://localhost:5000/packages/template-explorer/local.html"
19+
"open": "open http://localhost:5000/packages/template-explorer/local.html",
20+
"preinstall": "node ./scripts/checkYarn.js"
2021
},
2122
"types": "test-dts/index.d.ts",
2223
"tsd": {

scripts/checkYarn.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if (!/yarn\.js$/.test(process.env.npm_execpath || '')) {
2+
console.warn(
3+
"\u001b[33mYou don't seem to be using yarn. This could produce unexpected results.\u001b[39m"
4+
)
5+
}

0 commit comments

Comments
 (0)