Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2021-06-03 22:59:07 +0300
committerGar <gar+gh@danger.computer>2021-06-10 20:10:35 +0300
commita4a0e68a9e34a4c99e10e4fb8c5f89d323a4192f (patch)
treece5c982c758a762b9980fc6a087031bd8953ce75 /scripts
parentf130a81d62bf4f540ab252a09ff5a618827f9265 (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 'scripts')
-rw-r--r--scripts/bundle-and-gitignore-deps.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/bundle-and-gitignore-deps.js b/scripts/bundle-and-gitignore-deps.js
index 1c7f0eb36..84a3ab3ad 100644
--- a/scripts/bundle-and-gitignore-deps.js
+++ b/scripts/bundle-and-gitignore-deps.js
@@ -26,6 +26,27 @@ arb.loadVirtual().then(tree => {
const ignoreData = `# Automatically generated to ignore dev deps
/.package-lock.json
package-lock.json
+CHANGELOG*
+README*
+.editorconfig
+.idea/
+.npmignore
+.eslintrc*
+.travis*
+.github
+.jscsrc
+.nycrc
+.istanbul*
+.eslintignore
+.jshintrc*
+.prettierrc*
+.jscs.json
+.dir-locals*
+.coveralls*
+.babelrc*
+.nyc_output
+.gitkeep
+
${ignores}
`
writeFileSync(ignore, ignoreData)