broccoli-bower
broccoli-bower copied to clipboard
Add ability to specify the bowerDir
This is useful when the bower.json isn't in a sensible location.
When does that happen? If bower-config doesn't return the right directory, shouldn't we improve it to always return the right thing, rather than adding an extra knob to broccoli-bower?
The bower.json isn't in the current working directory in the project I'm working on and bower-config defaults to process.cwd(). Alternatively we can provide the cwd argument to read(), but I thought this was clearer.
I still feel a bit dubious about this use case, and I'm not 100% sure what the right solution is to have a bowerDir option or to pass cwd.
To help me understand better, can you elaborate some more on why the bower.json isn't in the project directory for you? I'd like to understand your project structure.
We have a node project which contains two client-side apps: client/ and dashboard/, both of which have their own bower.json files. One alternative would be to have duplicate Brocfiles in each of these directories, but I felt this was not a good solution.
I personally think it's reasonable to allow this to be specified, and it increases the utility of the module. Also if we don't allow it you'll continue to get bugged from people in my situation looking for a solution.