variables.less can be .gitignored
When using Bootstrap as git submodule, the goal is to be able to customize it and compile it together with the project (my example is using it with Play2 framework).
In order to freely customize variables.less, but to be able to git pull Bootstrap project without overriding customization changes, variables.less can be put into .gitignore, and variables.less.sample provided instead.
A way to do it right now is to copy bootstrap.less and variables.less to your own directory, modifying bootstrap.less to import everything but variables.less from the Bootstrap directory, and only importing the modules you need.
Yes, thanks, that is the way I'm doing it now. Btw, even if making additional file variables-local.less and overriding values there, and then using it in bootstrap.less - anyway we modify bootstrap.less.
So at the end modify one of source files: either bootstrap.less or variables.less, so I not found yet any way to do it without modifying source files.
Let me know of any better idea. Thanks.
Creating a new file as a layer between should suffice for this instance. We might start including a standard variables override file, but unsure about that for now.
@jacobrask, @mdo, copying the less files to their own directory prevents one from using the official Makefile to compile the css.
I'd like to:
- Not make any changes to the bootstrap submodule.
- Customize bootstrap variables.
- Compile bootstrap using the official Makefile.
As far as I can see, this is the usual "pick any two out of three" situation and only gitignore can help.
for 3) you need the corresponding node.js modules as well. the file package.json provides you with details on which those are. or you copy the package.json file over to your custom dir, and run "npm install" without argument. These needed modules are fetched from that file. This also assumes you haven't changed paths in your custom directory.
@neverendingo, the idea was to make the files within the submodule (so as to limit the amount of extra files I need to commit into my own repo) and symlink them from my project.
@tasuk same answer then, but i guess you need to adjust the paths in the makefile. This of course without knowing your specific setup.
@neverendingo, the Makefile is part of Twitter Bootstrap, I should not have to touch it. Of course I can copy it and make changes, but that defeats the purpose of using the library as a submodule.