
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
grunt-plugin-pkg2cmp
Advanced tools
To create a component.json file for bower from the package.json
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-plugin-pkg2cmp --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-plugin-pkg2cmp');
In your project's Gruntfile, add a section named plugin_pkg2cmp to the data object passed into grunt.initConfig().
grunt.initConfig({
pkg2cmp: {
options: {
// overwrite 'main' or 'dependencies' in the package.json here.
},
target: {}
}
})
Type array or string. Such as ['main.js']
Type: object. Such as {'jquery': '1.9.2'}
In this example, all of 'name', 'version', 'main' and 'dependencies' will be got from the package.json.
grunt.initConfig({
pkg2cmp: {
target: {}
},
})
In this example, both 'name' and 'version' will be got from the package.json, 'main' will be overwrite to 'main.min.js', 'dependencies' will be added an additional key-value pair in the component.json.
grunt.initConfig({
plugin_pkg2cmp: {
options: {
main: 'main.min.js',
dependencies: {
'backbone': '1.0.0'
}
},
target: {}
}
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
0.1.0 Init version. Copy 'name', 'version', 'main' and 'dependencies' in the package.json to the componenet.json, add allow overwrite 'main' and update 'denpendencies' in the 'options' field.
FAQs
To create a component.json file for bower from the package.json
We found that grunt-plugin-pkg2cmp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.