skip-local-postinstall
Advanced tools
Comparing version
@@ -5,2 +5,9 @@ # Changelog | ||
### [1.0.3](https://github.com/tobua/skip-local-postinstall/compare/v1.0.2...v1.0.3) (2020-11-01) | ||
### Bug Fixes | ||
* **npm:** workaround to prevent error for missing variable in npm 7 ([c0c4ede](https://github.com/tobua/skip-local-postinstall/commit/c0c4edee76fd6fbf066c8086b620046f0f43bb26)) | ||
### [1.0.2](https://github.com/tobua/skip-local-postinstall/compare/v1.0.1...v1.0.2) (2020-09-05) | ||
@@ -7,0 +14,0 @@ |
module.exports = () => { | ||
const { INIT_CWD, PWD } = process.env | ||
if (INIT_CWD === PWD || INIT_CWD.indexOf(PWD) === 0) { | ||
if (!INIT_CWD || INIT_CWD === PWD || INIT_CWD.indexOf(PWD) === 0) { | ||
console.info(`Skipping 'postinstall' on local install`) | ||
@@ -5,0 +6,0 @@ process.exit(0) |
{ | ||
"name": "skip-local-postinstall", | ||
"version": "1.0.2", | ||
"description": "Skips postinstall when installed locally.", | ||
"version": "1.0.3", | ||
"repository": "github:tobua/skip-local-postinstall", | ||
"scripts": { | ||
"build": "padua build", | ||
"start": "padua watch" | ||
}, | ||
"main": "./index.js", | ||
@@ -13,2 +17,5 @@ "source": "./index.js", | ||
], | ||
"devDependencies": { | ||
"padua": "^0.1.4" | ||
}, | ||
"prettier": "padua/configuration/.prettierrc.json", | ||
@@ -37,5 +44,2 @@ "eslintConfig": { | ||
}, | ||
"devDependencies": { | ||
"padua": "^0.0.8" | ||
}, | ||
"engines": { | ||
@@ -42,0 +46,0 @@ "node": ">= 13.2.0" |
@@ -25,1 +25,3 @@ # skip-local-postinstall | ||
Credits to Már Örlygsson for suggesting this on [Stackoverflow](https://stackoverflow.com/a/53239387/3185545s). | ||
**Please note** that the environment variable used for this plugin has dissapeared in npm Version 7: [GitHub Issue in npm CLI Repository](https://github.com/npm/cli/issues/2033). |
3133
21.91%27
8%