Skip to content

Commit 7909b1d

Browse files
committed
[dist tiny] scripts/npm-high-impact-json.js
1 parent 514fab3 commit 7909b1d

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ dist
139139
test/fixtures/*
140140
scratch*
141141

142+
# Script output
143+
npm-high-impact.json
144+
142145
# All default cache directories
143146
cache/*
144147
cache*/*

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,8 @@
3636
"bugs": {
3737
"url": "https://github.com/indexzero/_all_docs/issues"
3838
},
39-
"homepage": "https://github.com/indexzero/_all_docs#readme"
39+
"homepage": "https://github.com/indexzero/_all_docs#readme",
40+
"devDependencies": {
41+
"npm-high-impact": "^1.10.0"
42+
}
4043
}

pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/npm-high-impact-json.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const { writeFileSync } = require('node:fs');
2+
const { npmHighImpact } = require('npm-high-impact');
3+
4+
const argv = require('minimist')(process.argv.slice(2));
5+
const filename = argv._[0] || 'npm-high-impact.json';
6+
7+
writeFileSync(filename, JSON.stringify(npmHighImpact, null, 2), 'utf8');

0 commit comments

Comments
 (0)