A customizable Meteor package for Bootstrap Switch. It gives you the option to choose between Bootstrap 2 and 3 themes and modify it as needed.
In a Meteor app directory, enter:
$ meteor add ctjp:meteor-bootstrap-switch
Create a custom.bootstrap-switch.json file somewhere in your project (/client/lib/custom.bootstrap-switch.json
for example). Set the contents as seen below:
{
"theme": "bootstrap3",
"standalone": true
}
Set the theme
option to bootstrap2
if you wish to use the Bootstrap 2 theme or to bootstrap3
to use the Bootstrap 3 theme.
If you are using a Bootstrap package (such as nemo64:bootstrap) that includes the mixins
and variables
files, you need to set the standalone
option to false
.
When you start Meteor, the package will generate the files below in the same directory as the custom.bootstrap-switch.json file:
if standalone
is true
- custom.bootstrap-switch.bootstrap2-variables.import.less (if
theme
isbootstrap2
) - custom.bootstrap-switch.bootstrap3-variables.import.less (if
theme
isbootstrap3
) - custom.bootstrap-switch.build.import.less
Customize the *variables.import.less file and @import
the custom.bootstrap-switch.build.import.less file into your project.
if standalone
is false
- custom.bootstrap-switch.import.less
Note that this assumes that you have the Bootstrap mixins
and variables
files in your project. @import
the custom.bootstrap-switch.import.less file into your project.
After removing the package, make sure to remove the generated files from your project.
- nostalgiaz for Bootstrap Switch.
- Nemo64 for the Meteor package build plugin.