Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Add grunt-bower-hooks into Gruntfile tasks #38

Closed
alejandroiglesias opened this issue Mar 20, 2013 · 1 comment
Closed

Add grunt-bower-hooks into Gruntfile tasks #38

alejandroiglesias opened this issue Mar 20, 2013 · 1 comment

Comments

@alejandroiglesias
Copy link

Currently, the bower task grunt-bower-hooks is configured in the Gruntfile but seems it's not being used by any task. I was wondering why installing new components through Bower didn't updated RequireJS config until I saw this. Does it makes sense? If not, any other reason my RJS config doesn't updates in my main.js after installing components?

@sindresorhus
Copy link
Member

We haven't documented it yet, because it has a limitation of not handling baseUrl paths well. When this is fixed it will be documented.

There isn't currently any way we can know when something is installed in using Bower. We could add it to the build task, but that would be too magic, since it installing a Bower component might break building sometime later, which is a disconnect and a potential goldmine for invalid issues. Rather for now we're going with that the user must run grunt bower to wire up installed components for now. You can shell function this for convenience bower() { bower install $1 && grunt bower }. And we'll be exploring adding postinstall hooks to Bower which would let us do this automatically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants