Questions tagged [gulp-less]

gulp-less is a gulp plugin for Less (a dynamic stylesheet language).

gulp-less is a gulp plugin for the dynamic stylesheet language called Less.

118 questions
0
votes
1 answer

Changing output directories/files to lowercase in Gulp

I'm using Gulp to automatically copy/bundle/compile my files, I basically copy the entire folder structure from the base folder (MyProject/Scripts) to wwwroot/js. In the process of copying/processing I want to rename the output path/filenames to…
0
votes
1 answer

Gulp watch less and error?

I am using gulp for creating some css from less and have watch function. Everything working ok when there is no errors in less files, watch is calling less function and compile css. But when i have errors in less files, watch just breaks say where…
Miomir Dancevic
  • 6,726
  • 15
  • 74
  • 142
0
votes
1 answer

Why is my Less outputting a promise error result instead of CSS?

I am trying to debug why gulp-less is not outputting correct CSS and throwing an exception. It seems like less.js seems to be not outputting CSS. Here is my code: var accord = require('accord'); var less = accord.load('less'); …
pkumar0
  • 2,069
  • 3
  • 14
  • 21
0
votes
0 answers

LESS: Compile variables as PHP placeholders

I compile .less files into minified .css files using gulp. There are some variables defined in the less files like this: @error-red: #cc0000; I want to compile PHP placeholders into the minified css files, so the variables can be filled in later…
KWeiss
  • 2,954
  • 3
  • 21
  • 37
0
votes
1 answer

Gulp ignoring dependency

I'm trying to figure out why my gulp tasks aren't running in the order i want them to, here is the code; gulp.task('styles', ['clean-styles'], function () { log('Compiling Less --> CSS'); return gulp .src(config.less) .pipe($.less()) …
alexc
  • 1,250
  • 2
  • 17
  • 44
0
votes
1 answer

Is it possible / How to run gulp modules directly?

It would make sense for me to use some of gulp modules/plugins independently. E.g.: I have installed gulp-less globally (npm install --global gulp-less) and want to use it instead of lessc in the manner like grunt-less -options ./my/css/folder or…
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
1 answer

gulp.watch - Error: watch null EMFILE

I've been getting various errors with gulp.watch lately, so I set up a very simple test project. I am clueless as to why I am getting errors. The project contains 5 files: index.html package.json styles.css styles.less gulpfile.js I'm only using…
The Qodesmith
  • 3,205
  • 4
  • 32
  • 45
0
votes
1 answer

Compile less and output minify and non-minify files

I have a task in Gulp that compile a less file in css. I want to output the non-minify and the minify version with sourcemaps. I can't find a soluction. This is my actual task that should do this job: return…
Alex Ferreli
  • 548
  • 1
  • 7
  • 14
0
votes
1 answer

Gulp not matching all my less files in the styles directory

I am new to gulp and I am wondering what I am doing wrong as it will only create my styles.css file but none of my other css files are being created from the less directory my gulp file /* File: gulpfile.js */ // grab our gulp packages var…
webdevgirl
  • 23
  • 4
0
votes
1 answer

gulp-less messes with global variable

I'm trying to pass a version string from gulp to less, as demonstrated in the following example project: package.json: { "name": "webui", "version": "0.0.0", "private": true, "devDependencies": { "gulp": "^3.9.0", "gulp-less":…
Matthias Langer
  • 994
  • 8
  • 22
0
votes
1 answer

Gulp task runs multiple times

I have a gulp task that runs multiple times every time I make a change to a file. var gulp = require('gulp'); var concat = require('gulp-concat') var gulpLess = require('gulp-less'); var notify = require("gulp-notify"); var less = []; // array of…
NicholasJohn16
  • 2,390
  • 2
  • 21
  • 45
0
votes
3 answers

Gulp task comple less to same level folder called css

I want to have a gulp task in Visual Studio Code which watches all files in a folder called less with the extension .less. When found, a task must compile the less files to a folder called css on the same level as the less folder. Current code: …
0
votes
3 answers

I'm getting the following error : others/dataTables.bootstrap.less' wasn't found

This is my gulpfile. I don't know what is going on with this. as it worked before in my other project. is something outdated or something? var gulp = require('gulp'); var rename = require('gulp-rename'); var elixir =…
losee
  • 2,190
  • 3
  • 29
  • 55
0
votes
1 answer

gulp-less set global var

I use lessc to compile my file in command line before, and it contains couple options like this: lessc --global-var=ENV=dev --global-var=version=10 --no-color $FileName$ Now I want to use gulp-less to compile it, but how can I pass my options to…
0
votes
0 answers

Compiling bootstrap 2.1.0 less files as part of a gulp build

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…
Troup
  • 573
  • 5
  • 17