Reputation: 13908
According to this post bower should be able to run a postinstall script in versions 1.3.1 and above. I am using bower 1.3.12.
Here's my bowerrc file:
{
"scripts": {
"postinstall": "./node_modules/grunt-cli/bin/grunt"
}
}
However, when I install the package using bower, the hook does not get executed. What am I doing wrong?
Upvotes: 5
Views: 1577
Reputation: 437
The simple reason is because you don't have any packages in your bower.json or all of the packages have been installed.
Please have a look at my issue reported in github: https://github.com/bower/bower/issues/2302
Upvotes: 0
Reputation: 501
I have the same problem as yours. I have been resolved by add an variable cwd to .bowerrc file:
{
"cwd": "./",
"scripts": {
"postinstall": "grunt wiredep"
}
}
Upvotes: 3