From: limichange Date: Tue, 9 Jun 2020 21:36:45 +0000 (+0800) Subject: workflow: alert user working on repo if not using yarn (#1237) X-Git-Tag: v3.0.0-beta.15~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bccae1632f4fd5b524e2eced370423a5a49b2dc0;p=thirdparty%2Fvuejs%2Fcore.git workflow: alert user working on repo if not using yarn (#1237) --- diff --git a/package.json b/package.json index a38b05a6b2..331d5fdf2c 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/scripts/checkYarn.js b/scripts/checkYarn.js new file mode 100644 index 0000000000..19d9f5157f --- /dev/null +++ b/scripts/checkYarn.js @@ -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" + ) +}