Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "assert-pm", | ||
"description": "Assert that a package manager was used when running a yarn/npm script.", | ||
"version": "1.0.1", | ||
"description": "Assert that a certain package manager was used when running a yarn/npm script.", | ||
"version": "1.0.2", | ||
"main": "index.js", | ||
@@ -13,3 +13,6 @@ "license": "MIT", | ||
"yargs": "^11.0.0" | ||
}, | ||
"scripts": { | ||
"exec": "./index.js" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # assert-pm | ||
To avoid contributors accidentally using the "wrong" package manager and getting hard to debug errors, you can use `assert-pm` as a preinstall script. It'll cause the installation to fail and warn the user. | ||
To avoid contributors accidentally using the "wrong" package manager and getting hard to debug errors, you can use `assert-pm` as a postinstall script. It'll cause the installation to fail and warn the user. | ||
@@ -20,7 +20,7 @@ ## Installation | ||
If you are managing your packages with workspaces, you can add it to your parent package.json as preinstall script. Make sure to not add it to packages you do publish as this script will also be run upon installation by users. | ||
If you are managing your packages with workspaces, you can add it to your parent package.json as postinstall script. Make sure to not add it to packages you do publish as this script will also be run upon installation by users. | ||
``` | ||
"scripts": { | ||
"preinstall": "assert-pm yarn --message" | ||
"postinstall": "assert-pm yarn --message" | ||
} | ||
@@ -38,3 +38,3 @@ ``` | ||
``` | ||
pmtest@1.0.0 preinstall | ||
pmtest@1.0.0 postinstall | ||
> assert-pm yarn | ||
@@ -41,0 +41,0 @@ |
Sorry, the diff of this file is not supported yet
11752