yeoman / bower-requirejs

[DEPRECATED] Automagically wire-up installed Bower components into your RequireJS config
375 stars 68 forks source link

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

Open kohlmannj opened 8 years ago

kohlmannj commented 8 years ago

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.