diff options
author | 2020-11-18 23:26:45 +0100 | |
---|---|---|
committer | 2020-11-18 23:26:45 +0100 | |
commit | 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch) | |
tree | 8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/in-publish/index.js | |
parent | 1870f3fdf43707a15fda0f609a021f516f45eb63 (diff) | |
download | website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2 website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip |
rm node_modules
Diffstat (limited to 'node_modules/in-publish/index.js')
-rw-r--r-- | node_modules/in-publish/index.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/node_modules/in-publish/index.js b/node_modules/in-publish/index.js deleted file mode 100644 index 8cfc92f..0000000 --- a/node_modules/in-publish/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' -function inCommand (cmd, cmdStr) { - if (process.env.npm_command) { - return process.env.npm_command === cmdStr - } - - try { - var npm_config_argv = JSON.parse(process.env['npm_config_argv']) - } catch (e) { - return false - } - - if (typeof npm_config_argv !== 'object') process.exit(1) - if (!npm_config_argv.cooked) process.exit(1) - if (!npm_config_argv.cooked instanceof Array) process.exit(1) - - var V - while ((V = npm_config_argv.cooked.shift()) !== undefined) { - if (/^-/.test(V)) continue - if (cmd.test(V)) return true - return false - } - return false -} - -exports.inPublish = function () { - return inCommand(/^pu(b(l(i(sh?)?)?)?)?$/, 'publish') -} - -exports.inInstall = function () { - return inCommand(/^i(n(s(t(a(ll?)?)?)?)?)?$/, 'install') -} |