How to configure .json composer to download specified files only?

I want to install twitter bootstrap using composer, this is my composer.json

{ "name": "Bootstrap", "description": "Bootstrap 3.0", "type": "component", "require": { "components/bootstrap": "3.0.*" }, "config": { "component-dir": "assets" }, "extra": { "components": { "files": [ "js/bootstrap.min.js", "css/*.css", "fonts/*" ] } } } 

As a result, I still get what I want < not , for example

  • assets / jquery directory (I specified only the bootstrap component)
  • assets / bootstrap / js / bootstrap.js (I only specified bootstrap.min.js)
  • vendor / directory (like other copy I don't want)

enter image description here

enter image description here

I just want to use bootstrap since I'm a web application developer, so I don't want these tons of files, I know. If I downloaded the zip file from github.com, I can manually extract only what I want, but I expect to use the composer, because whenever updates are released, I can just use the composer update if I have the correct composer file .json

So, please help me edit the .json composer to meet more requirements, please help with anything at all, at least this could be a good starting point.

Thanks.

+1
source share

Source: https://habr.com/ru/post/1264396/


All Articles