yeoman / bower-requirejs

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

Add support for main in bower.json given as array of Strings #98

Closed bartekbp closed 10 years ago

bartekbp commented 10 years ago

Bower permits overriding dependency main:

{
  "name": "test",
  "version": "1.0.0",
  "dependencies": {
    "typeahead.js": "0.10.2"
  },
  "overrides": {
    "typeahead.js" : {
      "main": ["dist/bloodhound.js", "dist/typeahead.bundle.js"]
    }
  }
}

But such a config breaks plugin - main is assumed to be a String. Could you add support for this use case?

bartekbp commented 10 years ago

I was able to fix it using different config setting.

Correct config:

{
  "name": "test",
  "version": "1.0.0",
  "dependencies": {
    "typeahead.js": "0.10.2"
  },
  "overrides": {
    "typeahead.js" : {
      "main": "dist/typeahead.bundle.js"
    }
  }
}

typeahead.bundle.js already contains bloodhound

xmlking commented 9 years ago

in my case I have to override both js and css as the provider's bower.js contains ng-table.min.js and ng-table.min.css , and I need non-minified files as my workflow has its own minification step.

  "dependencies": {
    "ng-table": "~0.4.3",
  },
  "overrides": {
    "ng-table": {
      "main": [
        "dist/ng-table.js",
        "dist/ng-table.css"
      ]
    },
  }

It would be nice if supported this feature.