Bootstrap packaged for Meteor.js.
Usage
meteor add twbs:bootstrap
Features requiring JavaScript (such as drop-downs) or custom jQuery plugins like tooltip or popover should work automatically. The package does this for you.
If they don't work in templates other than body, make sure to run the initialization code in Template.<yourtemplate>.rendered:
1Template.foo.rendered = function () { 2 this.$('[data-toggle="dropdown"]').dropdown(); 3 this.$('[data-toggle="tooltip"]').tooltip(); 4 this.$('[data-toggle="popover"]').popover(); 5}
For performance reasons, the Tooltip and Popover data-apis are opt-in. Above, we initialize them in the limited scope of the template DOM.
Package features
- Opt-in jQuery plugins are enabled, as long as you use the
data-toggleattribute in your HTML. Tooltips and popovers "just work". - No need for CSS override files - Meteor will automatically "convert relative URLs to absolute URLs
when merging CSS files" since v0.8.1
so CSS
@font-face src url('../fonts/...')will be resolved to the correct/packages/.../fonts/...path. - Tests that fonts are downloadable.
- Tests that all jQuery custom plugins instantiate correctly.
- Visual checks for plugins, including dropdown, popover, tooltip, are included.
Versions
There are two versions of this package:
- twbs:bootstrap - the CSS, JS including all jQuery plugins, and the Glyphicons font are included.
- twbs:bootstrap-noglyph - Only the Bootstrap .CSS and .JS files (including the plugins) are packaged. Useful if you plan to use a different icon set instead of Glyphicons.
If you need more detailed control on the files, or to use .less, see Nemo64's package.
Issues
If you encounter a Meteor-related issue while using this package, please CC @dandv when you file it.