workflow: alert user working on repo if not using yarn (#1237)

This commit is contained in:
limichange 2020-06-10 05:36:45 +08:00 committed by GitHub
parent 958b6c80cf
commit bccae1632f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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": {

5
scripts/checkYarn.js Normal file
View File

@ -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"
)
}