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
6
votes
1 answer

How to have sourcemaps include all my LESS files with gulp

I have two LESS files in my /less folder : main.less: @import 'vars'; body{ background-color: @blau; } and vars.less @blau : #6621ab; My gulp task using gulp-less and gulp-sourcemaps gulp.task('less', function () { …
Karlas
  • 97
  • 8
6
votes
1 answer

Sourcemap wrong after combining vendor CSS with LESS and after gulp-minify

I'm trying to do the following: Combine all CSS files (jQuery plugins) Combine media queries Minify CSS Write sourcemap after that I try to do something else in a different folder Translate LESS Combine media queries Minify resulting CSS Write…
lumio
  • 7,428
  • 4
  • 40
  • 56
5
votes
3 answers

Can Gulp change LESS variables?

I'm looking to toggle IE8 mode in my LESS files and automated the file generation in Gulp. This is where I stopped in what to pass gulp-less (minus a bunch of stuff): var IE = true; var LESSConfig = { plugins: [ ... ], paths:…
Lance
  • 861
  • 7
  • 12
5
votes
2 answers

gulp-watch, gulp-watch-less don't fire

I'm having trouble getting gulp-watch or gulp-watch-less to fire after following the documented examples. I originally through the problem was with lazypipe (not shown here), but it appears to me that I'm doing something wrong in the way I'm using…
sak_to
  • 399
  • 4
  • 13
5
votes
1 answer

Is there any way to compile less files with @imports and concatenate them with Gulp, all in the same stream?

I`m triyng this in my gulpfile.js: gulp.task('buildStyles', function() { return gulp.src([ './styles/less/main.less', './styles/less/widgets/widgets.less', './styles/less/pages/pages.less', './styles/less/themes/default.less', …
5
votes
2 answers

Enabling gulp-watch conditionally with gulp-if (or something else)

Basically I want to setup my task so that if I do gulp less --watch it will watch, otherwise just do the build. This is what I have so far: 'use strict'; var gulp = require('gulp'); var less = require('gulp-less'); var gulpif =…
knownasilya
  • 5,998
  • 4
  • 36
  • 59
5
votes
1 answer

How to have Gulp LESS only output main file, ignoring includes?

I have a folder full of LESS files in my app folder. There a 2 main files and several includes, all of which are prefixed with "_". I want to only output those 2 files and their sourcemaps to my build folder, but of course the default setup…
Steve
  • 14,401
  • 35
  • 125
  • 230
4
votes
1 answer

Bundle many LESS files into a single LESS file

I'm making a library containing some generic UI components, some kind of Bootstrap. Suppose I have the following LESS files structure: button.less checkbox.less index.less variables.less Each component style file has @import "variables.less";.…
Alexander Shutau
  • 2,660
  • 22
  • 32
4
votes
3 answers

How to use globally installed gulp modules?

I tried this tutorial to basically setup my gulp project and activate less processing and watching. It works. Now I'd like to install the modules globally, in order to acces them from everywhery on the machine and not to installa them for every…
automatix
  • 14,018
  • 26
  • 105
  • 230
4
votes
0 answers

GULP LESS Imports not working in gulp-less npm

Having used Gulp all the time for 2 last years, I've suddenly got a problem with the less file imports and just can not resolve it. I've tried more then 5 combinations, such as from SmashingMagazine, from gulp-less homepage, etc... none worked for…
aspirinemaga
  • 3,753
  • 10
  • 52
  • 95
4
votes
1 answer

How do I create a sourcemap back to the original .less files from a minified CSS file?

I am working with Gulp.js, and I am stumped trying to get gulp-sourcemaps to point all the way back at the original less files, after I do a minification step. Since gulp-minify-css doesn't support sourcemaps, I am using postcss & csswring. Ideally,…
Tim White
  • 355
  • 2
  • 8
3
votes
1 answer

compiling less from gulp with options

We're using gulp-less to compile LESS files to css. The problem is that we have calc() statements in the less files which we want the less compiler to copy over to the css as-is, instead of evaluating them during compilation. When invoking lessc…
Dolev
  • 85
  • 7
3
votes
2 answers

Gulp-less not building LESS when included file is changed

I am using the following folder structure: css |_ main.css | |_ less |_ main.less |_ sub.less | |_ shared |_ variables.less |_ header.less |_ footer.less I am using the following in my gulpfile.js gulp.task('less',…
Jonathan
  • 1,833
  • 13
  • 15
3
votes
1 answer

Gulp-watch do not work, can not run it

I have gulpfile.js var gulp = require('gulp'), browserSync = require('browser-sync'); var clean = require('gulp-clean'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var less = require('gulp-less'); var livereload =…
ondra15
  • 143
  • 4
  • 16
3
votes
1 answer

Path to source map is wrong

I use the packages gulp-less and gulp-sourcemaps. My less file is located under Styles/main.less, but the generated source map points to source/main.less (where source/ seems to be a prefix). How to fix this, so the source map correctly points to…
NewGulpUserxx
  • 225
  • 4
  • 7