I am trying to compile the bootstrap less file using less js and trying to save the compiled css file to my server root folder.
I am little bit confused about which bootstrap less files to be included out of 40 less files. Currently I am including following files to get the bootstrap css:
- bootstrap.less
- variables.less
For changing the variables values and compiling, I am doing following:
HTML:
<body>
<div class="bg-primary"style="width:100%;height:100px"></div>
<a class="btn btn-primary" onclick="generatecss();"> compile </a>
</body>
JS:
function generatecss() {
less.modifyVars({
'@brand-primary': '#5cb85c'
});
}
After executing above js function the less is compiled properly changing the brand-primary color. But my problem is that how should I save this newly compiled file to my server root directory.