bower-requirejs icon indicating copy to clipboard operation
bower-requirejs copied to clipboard

--transitive appears to silently fail when a Bower component specifies dependencies that are ignored in .bowerrc

Open kohlmannj opened this issue 8 years ago • 0 comments

Hey there,

Just wanted start by document this. I have a few ignoredDependencies in .bowerrc:

{
  "scripts": {
    "postinstall": "grunt shell:bower-requirejs"
  },
  "ignoredDependencies": [
    "d3",
    "backbone",
    "gsap",
    "jquery",
    "scrollmagic",
    "underscore"
  ]
}

…and I'm running a command like this as part of a Grunt shell task (long story short, I had to access a bower.json located somewhere other than the Grunt process.cwd()):

bower-requirejs -c js/app-config.js --transitive --exclude-dev --base-url ..

With a bower.json that specifies DataMaps as a dependency, which in turn specifies d3 as a dependency, bower-requirejs with the --transitive flag silently fails. That is, there's no console output and nothing gets written to the specified configuration file.

In many ways this failure makes a lot of sense to me, and it could be that this is a use case that bower-requirejs simply shouldn't support. That said, an enhancement would be to generate an error message to at least describe the failure case.

For what it's worth, I'd be happy to look into this someday.

kohlmannj avatar Mar 02 '16 14:03 kohlmannj