Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'd like to use composer for managing my front-end dependencies as well. Unfortunately, using "bower-asset/bootstrap": "dev-master" or "twbs/bootstrap": "dev-master" brings more than 80 MB of code, while I need only /dist/ from the whole bootstrap folder.

Is it possible to add only /dist/ of bootstrap to my application using dependency manager?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
218 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can ignore files with the composer fxp-asset plugin.

For instance, if want only the dist folder of bootstrap, add these lines in your composer.json :

 "config": {
    "process-timeout": 1800,
    "fxp-asset":{
        "ignore-files": {
            "bower-asset/bootstrap": [
                "!dist",
                "*"
            ]
        }
    }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...