You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.
Is there a way to change the working directory for where grunt-bower-concat looks for the .bowerc or bower_components ?
My Gruntfile and bower_components are in 2 different places.
I've tried (just for kicks)
expand: true
cwd: 'foo/bar'
Surprisingly it gave me a JavaScript exception (as a warning) when I tried that. Running "bower_concat:dist" (bower_concat) task Warning: Cannot call method 'indexOf' of undefined
The text was updated successfully, but these errors were encountered:
Good point. In hindsight, this would only be required if you have multiple bower_components directories that you want to target with one grunt file. I've found the .bowerrc at the root directory (and pointing it to the bower_components directory) solves my specific issue.
I tried a couple of things that yielded unexpected results though, like temporarily setting the grunt working directory to where the bower_components in a custom task with 'setBase'. This technique produced some unexpected and undocumented error.
So unless you're looking to support the multiple bower_components directories scenario, I think this is a non-issue. My apologies :).
I ran into the scenario above where I have two bower_components folders in subdirectories, being targeted by a single Gruntfile. I run grunt prompt to determine which subdirectory I'm targeting. It's probably a rare use-case, but I wanted to mention it because being able to specify the bower_components directory would be helpful for this task.
I don't see it as unusual. It is needed whenever you have bower.json in a subdirectory. Since bower is loaded as a submodule of grunt-bower-concat, it isn't possible to get to it.
Due to Grunts "principle" of not supporting package.json in a parent directory, you have to change the current working directory when loading tasks. Hence the cwd() read by bower will be the parent directory rather than the one with bower.json
Please support a cwd option in bowerOptions.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there a way to change the working directory for where grunt-bower-concat looks for the .bowerc or bower_components ?
My Gruntfile and bower_components are in 2 different places.
I've tried (just for kicks)
expand: true
cwd: 'foo/bar'
Surprisingly it gave me a JavaScript exception (as a warning) when I tried that.
Running "bower_concat:dist" (bower_concat) task
Warning: Cannot call method 'indexOf' of undefined
The text was updated successfully, but these errors were encountered: