generator-mocha icon indicating copy to clipboard operation
generator-mocha copied to clipboard

Option for Bower installation path

Open ain opened this issue 9 years ago • 2 comments

Currently all paths, e.g. ../bower_components/mocha/mocha.css are hard-coded and assume that Bower components reside at root level. In some cases though, this is not desired.

I'd suggest making paths dynamic with an option that would allow modifying Bower path.

Alternatively one could also identify if there's ../.bowerrc and fetch the path from there.

ain avatar Jul 14 '16 14:07 ain

Alternatively one could also identify if there's ../.bowerrc and fetch the path from there.

That's totally what we should do (but with bower.json). Using find-up, it should be fairly simple to locate the bower.json file and use it as the root where bower_components is located.

@ain any chance you're be willing to send a PR?

SBoudrias avatar Jul 14 '16 18:07 SBoudrias

Thanks for prompt feedback.

An important consideration though: bower.json location is not sufficient as one could go with .bowerrc with

{
  "directory": "app/bower_components"
}

next to bower.json. So it's slightly more complex.

I'm a bit overwhelmed currently, but PR would eventually be doable of course.

ain avatar Jul 14 '16 22:07 ain