How to install bootstrap.js using volo?

440 views
Skip to first unread message

Erik Steffl

unread,
Jun 1, 2012, 10:05:37 PM6/1/12
to vol...@googlegroups.com
Tried volo add bootstrap and it finds it, however instead of installing one bootstrap.js it seems to be installing tons of modules (i.e. bootstrap is split into separate js files instead being in one file).

For each of those it asks me for dependencies and 'What global to use for exported value' - not sure what to put there.

It also installs tests, e.g. www/js/lib/bootstrap/js/tests/unit/bootstrap-tooltip.js

Here's what the installation looks like:

------------ cut here ------------
erik@jojda:~/work/alica/demoVolo/client$ node ../node_modules/volo/bin/volo add bootstrap
Using github repo "twitter/bootstrap" for "bootstrap"...
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-alert.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  Bootstrap
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-typeahead.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-modal.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-carousel.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-collapse.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-tab.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-scrollspy.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-transition.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-button.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-alert.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-typeahead.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-modal.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-carousel.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-collapse.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-tab.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-scrollspy.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-phantom.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-transition.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-button.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-tooltip.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-popover.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/unit/bootstrap-dropdown.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/tests/phantom.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-tooltip.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-popover.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
No AMD/CommonJS dependencies detected for: www/js/lib/bootstrap/js/bootstrap-dropdown.js
List any dependencies, comma separated, no spaces:  
What global to use for exported value []:  
Installed github:twitter/bootstrap/v2.0.4 at www/js/lib/bootstrap
AMD dependency name: bootstrap
------------ cut here ------------

It seems like it simply dumped bootstrap directory into ./www/js/lib/bootstrap/, not sure whether that usable, it includes README.md, Makefile, package.json, less subdir (with less files) and lot of javascript files. It looks very different from regular bootstrap installation (which has css, img and js subdirs each with only few files).

Any clarifications? I am pretty confused :-)

  thanks,

        erik

James Burke

unread,
Jun 7, 2012, 5:42:38 PM6/7/12
to vol...@googlegroups.com
The behavior you saw stems from two things:

1) It looks like you added bootstrap to a project that is an AMD-based
project (which is the default for a "volo create" call -- the default
project is set up for AMD. So for scripts that are not already AMD or
CommonJS-style modules, it prompts the user to set the dependencies
and exports.

However, for something like bootstrap that has lots of files, it is a
bit of overkill. You can manually avoid it by doing "volo add --amdoff
bootstrap". I'm also considering changing this behavior to just doing
one prompt up front that describes what will happen, or just turn it
off.

2) The zip file is pulled from the github source for that tag, where
it looks like the release they have on their website:
http://twitter.github.com/bootstrap/assets/bootstrap.zip

is a built version of that source. The idea though behind a volo add
is that so you can get the project, particularly the JS modules, in
subcomponents and then only build in what you need.

However if most people wanted the full built sources, we could put in
a volo.url package.json shim that points to the above zip file instead
pulling the code from source. For me though, I would want the separate
components. If you like, volo should be able to fetch that URL
directly for installation.

James

Wandi Lin

unread,
Feb 25, 2013, 6:52:15 AM2/25/13
to vol...@googlegroups.com
you can use bootstrap/docs/assets/bootstrap.js.

this is how bower acoomplish this as written in component.json (https://github.com/twitter/bootstrap/blob/master/component.json)
Reply all
Reply to author
Forward
0 new messages