I'm trying to use the gulp-less plugin to compiles bootstrap 2.1.0 less file (yes a very old version) to CSS.
var gulp = require('gulp'),
less = require('gulp-less');
// Compile Our Less
gulp.task('less', function() {
return gulp.src('bower_components/bootstrap/less/bootstrap.less')
.pipe(less().on('error', function(err){
errorLog(err);
}))
.pipe(gulp.dest('compiled-bootstrap-css'));
});
gulp.task('default', ['less']);
function errorLog(err){
console.log(err);
}
No matter which version I use I see parse errors:
[16:08:01] Starting 'less'...
{ [Error: Missing closing ')' in file d:\Users\trouti\IdeaProject
bower_components\bootstrap\less\mixins.less line no. 552]
type: 'Parse',
filename: 'd:\\Users\\trouti\\IdeaProjects\\PublicPortal\\bower
otstrap\\less\\mixins.less',
index: 17957,
line: 552,
callLine: NaN,
callExtract: undefined,
column: 8,
extract:
[ ' .spanX (@index) when (@index > 0) {',
' (~".span@{index}") { .span(@index); }',
' .spanX(@index - 1);' ],
message: 'Missing closing \')\' in file d:\\Users\\trouti\\Idea
cPortal\\bower_components\\bootstrap\\less\\mixins.less line no.
stack: undefined,
lineNumber: 552,
fileName: 'd:\\Users\\trouti\\IdeaProjects\\PublicPortal\\bower
otstrap\\less\\mixins.less',
name: 'Error',
showStack: false,
showProperties: true,
plugin: 'gulp-less',
__safety: { toString: [Function] } }
I believe that in order to compile successfully the tool needs to use version 1.3.3 of Less:
http://twitter-bootstrap.1086183.n5.nabble.com/Error-compiling-less-files-v-2-0-4-td788.html
Unfortunately all the available versions of gulp-less build on a later version.
How can I integrate less 1.3.3 into my gulp build?
EDIT: This is not a duplicate of:
LESS: Unrecognized input error when using Bootstrap
because the answer there is to edit the bootstrap.less file. I can't/don't want to do this as I dynamically pull in the bootstrap files at build time using bower. I know I can fix it if I use less 1.3.3 but how can I call in to that from a gulp build when all versions of the gulp-less plugin use a higher version.