I’ve noticed that in _bootstrap.less, the files being imported do not have .less extensions. Because of this, whenever I go to compile Bootstrap, any file without the extension does not get compiled into “main.css.” In order for it to be compiled, I have to go in and manually add the extension.
Am I missing something? Or is this a bug?
They don’t need them. Are you not using Grunt and the included Less compiler to compile your stylesheets?
It sounds like you’re using a different compiler (which we’re not going to support).
Hey, @benword, thanks for getting back to me.
I am using Grunt (at least I think I am). But I have a hunch all is not working properly.
When I go to setup the compiler using
npm install -g grunt-cli, this is what I get. Which is terribly confusing, seeing as how I’ve setup Grunt on other machines before.
When I run
npm install in the “roots” directory, all seems to work and it pulls down the necessary dependencies.
I know I’m doing something wrong, I just can’t figure out what in the world I’ve done. Thanks in advance for your help, bud.
I’m confused - how are you trying to “compile Bootstrap” if you’re not using the grunt tasks in Roots?
Also, you should be able to Google that error and get results on how to solve your issue in the screenshot.
npm install -g (global), you’ll need to use
sudo as well.
sudo npm install -g grunt-cli.
Thanks, @swalkinshaw. I appreciate it.
Well, I am using Grunt. I CD into my roots directory, then run
grunt watch, but nothing compiles. I’m editing the Bootstrap variables file…but I understand there is a _variables.less file, as well. Should I be editing the latter as opposed to the former? Thanks again.
grunt watch does exactly what it sounds like. It watches for changes so unless you save an edited file it won’t compile.
grunt build, etc… Depending on what version of Roots you’re running the task may be different. They’re listed at the bottom of the gruntfile.js
watch task in Grunt does not (by default) watch Bootstrap vendor files because they are not intended to be included in your project repo (again, by default) hence they should not be modified in an out-of-the-box Roots installation. Roots uses Bower to install Bootstrap and if you modify its LESS and then update with Bower your modifications will be lost. See more here.
@emaildano and @cfx, thanks, y’all. I appreciate it!