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>2020-03-24 03:31:32 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-03-24 23:54:07 +0300
commitbe3796141440dfd29d0c674fc11426ed77ae870f (patch)
tree00048ba9d2468b058a4e695139f7e66c8a228996 /scripts
parent5e75850bc6258080de4e6c9cb5add378c2b9581f (diff)
Do not ship CoC/Contributing files for deps
Some of these are used under a somewhat ambiguous license, and we're moving away from the WeAll* stuff to just rely on the centralized npm code of conduct anyhow. Better to leave them out for now, as we go through and update the deps themselves to have a cleaner and more consistent project setup. PR-URL: https://github.com/npm/cli/pull/1054 Credit: @isaacs Close: #1054 Reviewed-by: @ruyadorno
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dep-update1
-rwxr-xr-xscripts/dev-dep-update1
-rw-r--r--scripts/gen-dev-ignores.js2
3 files changed, 4 insertions, 0 deletions
diff --git a/scripts/dep-update b/scripts/dep-update
index 006de17c7..7e56dbba8 100755
--- a/scripts/dep-update
+++ b/scripts/dep-update
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
node . install --save $1@$2 &&\
node scripts/gen-dev-ignores.js &&\
+rm -f node_modules/{*,*/*}/CODE_OF_CONDUCT.md node_modules/{*,*/*}/CONTRIBUTING.md &&\
git add node_modules package.json package-lock.json &&\
git commit -m"$1@$2" &&\
node . repo $1 &&\
diff --git a/scripts/dev-dep-update b/scripts/dev-dep-update
index cb0b783a8..eee2e209c 100755
--- a/scripts/dev-dep-update
+++ b/scripts/dev-dep-update
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
node . install --save --save-dev $1@$2 &&\
node scripts/gen-dev-ignores.js &&\
+rm -f node_modules/{*,*/*}/CODE_OF_CONDUCT.md node_modules/{*,*/*}/CONTRIBUTING.md &&\
git add package.json package-lock.json &&\
git commit -m"$1@$2" &&\
node . repo $1 &&\
diff --git a/scripts/gen-dev-ignores.js b/scripts/gen-dev-ignores.js
index 3f6dcb301..f07c2cd7e 100644
--- a/scripts/gen-dev-ignores.js
+++ b/scripts/gen-dev-ignores.js
@@ -2,4 +2,6 @@ const fs = require('fs')
const plock = require('../package-lock.json')
fs.writeFileSync(`${__dirname}/../node_modules/.gitignore`,
'## Automatically generated dev dependency ignores\n' +
+ 'CODE_OF_CONDUCT.md\n' +
+ 'CONTRIBUTING.md\n' +
Object.keys(plock.dependencies).filter(_ => plock.dependencies[_].dev).map(_ => `/${_}`).join('\n') + '\n')