grunt-bower-postinst

Execute post install action on bower components

Some bower components needs additionnal actions once Bower has retrieved the source from the repository. This plugin helps you to automate theses tasks in order to provide you the last step to your client-side dependency manager.

If you haven't used Grunt before, be sure to check out the Grunt 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-bower-postinst --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

In this example, the project needs the following Bower components: jquery, jquery.ui and bootstrap. The components jquery.ui and bootstrap need extra commands to get an aggregated and minimified version of the scripts and stylesheet.
We use the task bower from grunt-bower-task to perform the install of the components, then the bower_postinst task from the current plugin to run the required commands.