Gathering detailed insights and metrics for generate-json-webpack-plugin
Gathering detailed insights and metrics for generate-json-webpack-plugin
Gathering detailed insights and metrics for generate-json-webpack-plugin
Gathering detailed insights and metrics for generate-json-webpack-plugin
npm install generate-json-webpack-plugin
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
56 Stars
297 Commits
13 Forks
3 Watching
29 Branches
5 Contributors
Updated on 01 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-10.6%
4,268
Compared to previous day
Last week
-4.6%
23,496
Compared to previous week
Last month
0.4%
105,313
Compared to previous month
Last year
-33.3%
1,373,474
Compared to previous year
webpack plugin to generate a custom JSON asset
1npm install generate-json-webpack-plugin
1// webpack.config.js 2const GenerateJsonPlugin = require('generate-json-webpack-plugin'); 3 4module.exports = { 5 // ... 6 plugins: [ 7 // ... 8 new GenerateJsonPlugin('my-file.json', { 9 foo: 'bar', 10 }), 11 ], 12 // ... 13};
This will create a file my-file.json
in webpack's output directory, with contents:
1{ "foo": "bar" }
You may optionally pass 'replacer' and 'space' arguments as the 3rd and 4th arguments, which will be passed to JSON.stringify
to customize the JSON output:
1new GenerateJsonPlugin( 2 'my-file.json', 3 { foo: 'bar', one: 'two' }, 4 (key, value) => { 5 if (value === 'bar') { 6 return 'baz'; 7 } 8 return value; 9 }, 10 2 11);
my-file.json
will contain:
1{ 2 "foo": "baz", 3 "one": "two" 4}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
25 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More