Prevent from running npm

This commit is contained in:
roykho 2021-11-04 07:36:58 -07:00
parent 90075e81a6
commit acbd9883f1
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,9 @@
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"preinstall": "npx only-allow pnpm"
},
"devDependencies": {
"@automattic/nx-composer": "^0.1.0",
"@nrwl/cli": "latest",
@ -37,4 +40,4 @@
"lodash": "^4.17.21",
"wp-textdomain": "1.0.1"
}
}
}

View File

@ -14,6 +14,7 @@
},
"scripts": {
"check:subset-installed": "pnpm list --depth 1 install-subset > /dev/null 2>&1",
"preinstall": "npx only-allow pnpm",
"install:subset-only": "pnpm install --no-package-lock --no-save install-subset",
"install:no-e2e": "pnpm run check:subset-installed --silent || pnpm run install:subset-only && pnpx install-subset i no-e2e",
"build": "./bin/build-zip.sh",