Gathering detailed insights and metrics for @lomray/rollup-plugin-generate-package-json-v2
NPM was acquired by GitHub in March 2020.
Gathering detailed insights and metrics for @lomray/rollup-plugin-generate-package-json-v2
NPM was acquired by GitHub in March 2020.
npm install @lomray/rollup-plugin-generate-package-json-v2
48
Supply Chain
96.7
Quality
74.3
Maintenance
100
Vulnerability
98.6
License
33 Stars
81 Commits
6 Forks
2 Watching
1 Branches
2 Contributors
Updated on 19 Aug 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
200%
3
Compared to previous day
Last week
-50%
3
Compared to previous week
Last month
-9.5%
19
Compared to previous month
Last year
-94.8%
158
Compared to previous year
1
Generate package.json
file with packages from your bundle using Rollup.
This plugin is useful when you have a lot of packages in your current package.json
file and want to create a lean one with only packages from your generated bundle, probably for deployment.
1# yarn 2yarn add rollup-plugin-generate-package-json -D 3 4# npm 5npm install rollup-plugin-generate-package-json -D
1// rollup.config.js 2import generatePackageJson from 'rollup-plugin-generate-package-json' 3 4export default { 5 input: 'src/index.js', 6 output: { 7 file: 'dist/app.js', 8 format: 'cjs' 9 }, 10 plugins: [ 11 generatePackageJson() 12 ] 13}
There are some useful options, all of them are optional:
Type: string
Default: current working directory
Set input package.json
folder.
1generatePackageJson({
2 inputFolder: 'nested/folder'
3})
Type: string
Default: bundle output folder
Set output folder for generated package.json
file.
1generatePackageJson({ 2 outputFolder: 'dist' 3})
Type: object | function
Default: {}
Set base contents for your generated package.json
file.
1generatePackageJson({ 2 baseContents: { 3 scripts: { 4 start: 'node app.js' 5 }, 6 dependencies: {}, 7 private: true 8 } 9})
It can also be a function, which receives the contents of the input package.json
file.
1generatePackageJson({ 2 baseContents: (pkg) => ({ 3 name: pkg.name, 4 main: pkg.main.replace('src', 'dist') 5 dependencies: {}, 6 private: true 7 }) 8})
Type: Array | object
Default: []
Set dependencies which are not directly imported in the bundle, but are used by the app.
1generatePackageJson({ 2 additionalDependencies: ['pg'] 3})
It's also possible to add new dependencies or overwrite dependency version.
1generatePackageJson({
2 additionalDependencies: {
3 pg: '7.12.1',
4 'react-calendar': 'file:../react-calendar/react-calendar-v2.13.2.tgz'
5 }
6})
MIT
No vulnerabilities found.
Reason
no vulnerabilities detected
Reason
no dangerous workflow patterns detected
Reason
tokens are read-only in GitHub workflows
Reason
all dependencies are pinned
Details
Reason
no binaries found in the repo
Reason
GitHub code reviews found for 2 commits out of the last 30 -- score normalized to 0
Details
Reason
0 commit(s) out of 30 and 0 issue activity out of 10 found in the last 90 days -- score normalized to 0
Reason
no badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
license file not detected
Reason
security policy file not detected
Reason
no update tool detected
Details
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
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