diff options
author | isaacs <i@izs.me> | 2021-06-03 22:59:07 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-06-10 20:10:35 +0300 |
commit | a4a0e68a9e34a4c99e10e4fb8c5f89d323a4192f (patch) | |
tree | ce5c982c758a762b9980fc6a087031bd8953ce75 /node_modules/read-cmd-shim | |
parent | f130a81d62bf4f540ab252a09ff5a618827f9265 (diff) |
chore: check less stuff into node_modules
We bundle our deps, but we don't need to bundle docs, changelogs,
editorconfigs, test coverage reports, .github workflow definitions,
lint configurations, and all the rest, which we never use.
This cuts about 10% off of our publish artifact file size.
```
$ ls -laF npm-7.16.0-*.tgz
-rw-r--r-- 1 isaacs staff 7174497 Jun 3 13:01 npm-7.16.0-release-next.tgz
-rw-r--r-- 1 isaacs staff 6782377 Jun 3 13:00 npm-7.16.0-trim-node-modules.tgz
$ ls -laF npm-7.16.0-*.tar
-rw-r--r-- 1 isaacs staff 19020288 Jun 3 13:01 npm-7.16.0-release-next.tar
-rw-r--r-- 1 isaacs staff 17474048 Jun 3 13:00 npm-7.16.0-trim-node-modules.tar
```
PR-URL: https://github.com/npm/cli/pull/3362
Credit: @isaacs
Close: #3362
Reviewed-by: @nlf
Diffstat (limited to 'node_modules/read-cmd-shim')
-rw-r--r-- | node_modules/read-cmd-shim/README.md | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/node_modules/read-cmd-shim/README.md b/node_modules/read-cmd-shim/README.md deleted file mode 100644 index 457e36e35..000000000 --- a/node_modules/read-cmd-shim/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# read-cmd-shim - -Figure out what a [`cmd-shim`](https://github.com/ForbesLindesay/cmd-shim) -is pointing at. This acts as the equivalent of -[`fs.readlink`](https://nodejs.org/api/fs.html#fs_fs_readlink_path_callback). - -### Usage - -``` -const readCmdShim = require('read-cmd-shim') - -readCmdShim('/path/to/shim.cmd').then(destination => { - … -}) - -const destination = readCmdShim.sync('/path/to/shim.cmd') -``` - -### readCmdShim(path) -> Promise - -Reads the `cmd-shim` located at `path` and resolves with the _relative_ -path that the shim points at. Consider this as roughly the equivalent of -`fs.readlink`. - -This can read both `.cmd` style that are run by the Windows Command Prompt -and Powershell, and the kind without any extension that are used by Cygwin. - -This can return errors that `fs.readFile` returns, except that they'll -include a stack trace from where `readCmdShim` was called. Plus it can -return a special `ENOTASHIM` exception, when it can't find a cmd-shim in the -file referenced by `path`. This should only happen if you pass in a -non-command shim. - -### readCmdShim.sync(path) - -Same as above but synchronous. Errors are thrown. |