Grunt task for shrink wrapping your project's dependencies via npm shrinkwrap
This plugin requires Grunt ~0.4.2
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-shrinkwrapsy --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-shrinkwrapsy');
In your project's Gruntfile, the shrinkwrapsy
task is available to use.
You can run grunt shrinkwrapsy
standalone
Or add it to an existing task: grunt.registerTask('test', ['clean', 'shrinkwrapsy']);
The shrinkwrapsy
-task currently has seven options.
{
prune: true,
afterHooks: [],
beforeHooks: [],
devDependencies: true,
withoutDependencies: [],
withoutDevDependencies: [],
withoutPeerDependencies: []
}
If set to true
prune npm's dependencies before generating a shrinkwrap.
A little array of shell commands which will be ran through shelljs
before the any other operation is ran. Maybe useful for cleaning up some files or even removing some of npm's dependencies.
Kinda the same as beforeHooks
only that it - wait for it - runs after all commands have finished running.
Another boolean-flag indicating if the shrinkwrap should include npm's development dependencies. It transforms into the --dev
-flag.
An []
of dependencies names which shall be removed from the generated npm-shrinkwrap.json
. Might sound a bit woozy but is applicable in cases you e.g. want to symlink forked repositories.
Same as the above only for the devDependencies
of the npm-shrinkwrap.json
.
Again, same as the above only for the peerDependencies
of the npm-shrinkwrap.json
.
- 0.0.1 - First release.
- 0.0.2 - Adds support for removing dependencies.
- 0.0.3 - Makes removing dependencies more failsave.
- 0.1.0 - Release of first minor, proven stable.