The modules can be loaded by AMD script loaders like RequireJS.
The script requires nodejs 0.6 to run. Use npm to install it:
npm install -g bootstrap-amd
Transitions module as a dependancy for all modules. If you don't need transitions or want to add them manually, use '--no-transition' key:
bootstrap-amd path/to/git-cloned-bootstrap --no-transition
Create a config first:
...and then just include bootstrap as a dependancy:
You can use single Bootstrap AMD modules but do it at your own peril. AMD modules are in
path/to/bootstrap/amd/src directory. Configure the location just like you configure jqueryui-amd:
...and then reference the modules with a
The script works with Twitter Bootstrap source directory cloned from github. It doesn't clone the Bootstrap, it just expects a path to this directory as a first argument.
amd directory with
main.js file that contains Twitter Bootstrap AMD and
amd/src folder with converted modules.
This script assumes a directory for Twitter Bootstrap contains a
Since Twitter doesn't write their dependencies anywhere in the code, they are hardcoded in the script.