nikib3ro
nikib3ro

Reputation: 20596

Installing bootstrap using bower-installer

I am trying to install bootstrap 3.3.5 in my solution using bower-installer... I want to pull just distribution files (in dist folder) instead of everything that you get by doing bower install bootstrap#3.3.5.

However, bower.json in bootstrap 3.3.5 has these lines:

"main": [
    "less/bootstrap.less",
    "dist/js/bootstrap.js"
]

Thus, when I run bower-installer it copies just those two files. How do I configure bower-installer to copy all files from /components/bootstrap/dist so that I have all needed files (css, fonts, js)?

Upvotes: 4

Views: 1584

Answers (1)

nikib3ro
nikib3ro

Reputation: 20596

Seems this has already been discussed on some of the closed issues on GitHub:

After little experimentation I've got lucky using /** so my config looks like:

"install": {
    "path": "bower_dist",
    "sources": {
        "bootstrap": [
            "bower_components/bootstrap/dist/**"
        ]
    }
}

This preserves folder structure results in separate css, fonts, js folders within /bower_dist/boostrap/ with all needed files.

Upvotes: 3

Related Questions