nixon
nixon

Reputation: 1972

What to do when wiredep doesn't work

I've recently started using bower and wiredep. These guys play nicely together and usually work a treat.

I've come across the odd occasion where wiredep is not able to add the dependency, a recent example is:

"dependencies": {
    "slimScroll": "https://github.com/rochal/jQuery-slimScroll.git#~1.3.6",
  }

Is there a way to help wiredep wire these dependencies?

Upvotes: 0

Views: 595

Answers (2)

nixon
nixon

Reputation: 1972

Not sure why this was down voted.

The problem in this instance was that the package did not specify a main property in the bower.json

For anyone interested you can add an override to your bower.json, adding in the main that was missing from the original package.

"overrides": {
        "slimScroll":{
          "main":["jquery.slimscroll.js"]
        }
      }

Just saw another example: The bootstrap 3.3.5 bower package does not reference any css files in the main property as a result wiredep can't add the css.

Upvotes: 3

Bikas
Bikas

Reputation: 2759

Wiredep checks bower.json of every package and based on that, performs the operation. If there's no dependency information then wiredep simply ignores the package.

You can manually add those file or try alternative - inject.

Upvotes: 0

Related Questions