2

I am looking to install "lightbox" via bower and this works fine. I used the "ignoredDependencies" flag with bower to prevent jquery being installed alongside the lightbox as that is taken care of elsewhere.

When it comes to bower_concat I amended the config to read as so:

bower_concat: {
    dist: {
       dest: "js/bower.js",
       cssDest: "css/bower.css",
       bowerOptions: {
          ignoredDependencies: [
              "jquery"
          ]
       }
   }
}

and

bower_concat: {
   dist: {
      dest: "js/bower.js",
      cssDest: "css/bower.css",
      exclude: [
      "jquery"
       ]
   }
}

My intention is to "concat" the bower js without jquery.

But I get the following error:

Fatal error: Component jquery not installed. Try bower install --save jquery

Not sure if this is an actual issue with bower_concat or the way I am configuring this. Am pretty sure that "ignoredDependencies" is only for the actual install of the components but thought I'd give it was with a try here anyway. As it stands, I've had to amend the ".bower.json" file in the component and remove the jquery dependency entirely. I was hoping to avoid amending the component itself and just set it in some config somewhere.

Any help/advice would be appreciated.

Zakalwe
  • 1,444
  • 3
  • 14
  • 25
  • have-you two target for bower-concat labelled dist? it's a little weird. because you ignore the dependency, the needed jquery dependency is missing. you can use a different plugin (grunt-bower-task) to download your dependencies , and grunt-contrib-concat to concat only the file you need – sab Apr 15 '16 at 16:21

0 Answers0