Closed ghost closed 12 years ago
I had the same problem. I'm a bit of a brunch.io newb so at the moment I've only got a fairly hacky solution.
If you copy all of the bootstrap less files into you vendor directory, brunch build attempts to compile every file, and generates the error you've seen in your issue. If you look at the way the bootstrap build system is supposed to work you should just compile the single file bootstrap.less and this will call '@imports' on all the other bootstrap less files like reset.less.
I don't know how to tell brunch not compile all the .less files in the vendor directory, so I ended up moving them out of the vendor directory totally (e.g. into project_dir/bootstrap). Then in my app/styles/main.less I have the following:
@import "bootstrap/less/bootstrap.less";
That single import will compile the entire bootstrap library.
Documentation-wise, it may also be good to clearly address build-steps in library use-cases such as this, as bootstrap (et al) is greatly growing in popularity.
@paulmillr :Is this still the recommended way to include bootstrap?
@lipp if you want to extend less etc, put it in app/styles, for example, and import from there. if you don't, just put it in vendor/styles.
worked for me.. thanks.
one final newbie snag that might catch you with this approach.. tooltip.js should be loaded before popup.js..
before: [ 'vendor/scripts/console-helper.js', 'vendor/scripts/jquery-1.8.3.js', 'vendor/scripts/underscore-1.4.3.js', 'vendor/scripts/backbone-0.9.10.js', 'vendor/scripts/bootstrap/bootstrap-tooltip.js' ]
Adding it to the config file like this will get Bootstrap working.
Hi! Can anyone import twitter bootstrap?
I've noticed the error while importing reset.less from bootstrap dependencies: