Reputation:
Is it possible run "grunt" or "gulp" automatically during installation with bower?
to generate the compiled version of the package without including a compiled version in the git repository.
For example:
I install a github package called: foo/bar, I use: bower install foo/bar
I get the source code that has a Gruntfile.json file that compiles the source code in a single file called main.js. How do I get bower run "npm install && grunt" automatically
Upvotes: 1
Views: 685
Reputation: 29261
It would help if you could give a clearer use case, but you can use bower's install hooks to run an arbitrary command on install.
// .bowerrc
{
"scripts": {
"postinstall": "gulp build",
}
}
preinstall
, postinstall,
and preuninstall
are supported.
Upvotes: 2