简体   繁体   中英

add bootstrap to meteor package

meteor beginner here.

I have a local package (a personal variation of lukemadera:image-picker) in my meteor folder under

packages\\my-package

I'd like to use bootstrap styling within that package (specifically: apply the bs-grid to the content) - how do I do this most easily?

I integrated the package using api.use('twbs:bootstrap') , and added it with meteor add twbs:bootstrap . However, somehow the bootstrap styles are not applied to my (partly dynamically added) content.

Do I need to import it somewhere else so that I can use the different style classes?

You have 2 ways to do this;

  1. You need to go to location your_project_folder/.meteor/packages file you need to add line twbs:bootstrap and start meteor server with the command meteor , if the server was up, will auto-detect changes to the packages file and import the stuff for you.

  2. stop the server using CTRL + C 2 times, then run command meteor add twbs:bootstrap and then start server.

By this, you can do everything that is possible in bootstrap.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM