twbs:bootstrap

v3.3.2Published 11 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

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-toggle attribute 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:

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.