sparkle
sparkle

Reputation: 7398

Yarn Custom Bootstrap installation config.json

I want to install with Yarn a lighter version of bootstrap but using "yarn add boostrap" there is not way to pass a config.json file. How can I do it?

https://getbootstrap.com/docs/3.4/customize/

https://yarnpkg.com/en/package/bootstrap

Upvotes: 0

Views: 185

Answers (1)

Codebreaker007
Codebreaker007

Reputation: 2989

If I understand it right you want to install a customized (lighter) bootstrap version you created according to: https://getbootstrap.com/docs/3.4/customize/ or using a customizer tool.
Then use this command:

yarn add file:/path/to/local/folder 

installs a package that is on your local file system.
The command

yarn add bootstrap 

loads the precompiled version from the repo. so in your case the steps are:

  • Create customized bootstrap
    • Compile locally yourself OR
    • use online tool and download YOUR Bootstrap version
  • save package to a local folder in your project/ dev environment
  • add via yarn add file:/path/to/local/folder
  • Read more on adding packages: https://classic.yarnpkg.com/en/docs/cli/add/

Upvotes: 1

Related Questions