Configure bower to install only dist folder

bower, git, javascript

Solution

What you're looking for is the ignore property in `bower.json`: https://github.com/bower/bower.json-spec

The developer of the module can use the ignore attribute to exclude files when the module is downloaded and installed through Bower.

If you are the developer of said module, you can use the ignore attribute to exclude everything but the dist folder.

If you're not the developer of the module, then there's not much you can do, you will get whatever the developer of the module has deemed significant. In most cases, this is not a problem.

Here's a typical configuration for the ignore attribute:

{
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "package.json",
    "src"
  ]
}

Problem

I am trying to learn tools such as bower/grunt/requirejs in order to speed up the development process for my website and to make my code more modularized/efficient. I am currently following this tutorial. How does one make Bower only install the dist folder for my dependencies (setup in my component.json file) instead of the entire Git repository?

Original source