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
56
votes
2 answers

How can I use the path from gulp.src() in gulp.dest()?

Trying to create a gulp task that will pipe a bunch of files from different folders through LESS and then output them to a folder based on the original source. Consider this folder structure: Project +-- /Module_A | +- /less | | +- a.less | …
Adam
  • 738
  • 1
  • 5
  • 11
43
votes
6 answers

Using gulp to compile bootstrap.less files into main bootstrap.css?

I really do like gulpjs it was my task manager of choice, but I kind of wish I knew about task managers a few months back and got into gruntjs, mainly for the support. For gulpjs its hard to find information on specific things. My question is how…
Michael Joseph Aubry
  • 12,282
  • 16
  • 70
  • 135
32
votes
3 answers

Is there a way to rewrite the HTML to use gulp-minified CSS

I'm struggling with the following: My gulpfile.js compiles all .less, minifies it and concattenates all CSS into ./dist/all.min.css Is there a way I can rewrite the HTML file, remove all style tags and only put one style tag into it loading the…
dlaxar
  • 549
  • 1
  • 4
  • 9
23
votes
4 answers

Gulp less not handling includes properly, included variables not defined

I am using less and Grunt, and am moving to gulp. My less works. When I run: lessc public/less/myapp.less I get working output with no errors. All my less, including includes, is in public/less, BTW. Here is my gulpfile: var gulp =…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
19
votes
1 answer

Gulp watch and compile less files with @import

I'm trying to get my head around gulp to watch and compile a .less project + livereload. I have a style.less file which use @import. When i run the gulp task it doesn't seem to understand the imports. When I modify the main less file, gulp compiles…
Yannick Schall
  • 32,601
  • 6
  • 29
  • 42
15
votes
3 answers

Incremental gulp less build

In my office we are using gulp to build our less files. I wanted to improve the build task as it took over a second to build on a large project we recently worked on. The idea was to cache the files and only pass the one that changed. So I started…
Philipp Gfeller
  • 1,167
  • 2
  • 15
  • 36
13
votes
6 answers

Gulp browser-sync only works once

I'm trying out Gulp on one of my projects and I wanted to run it like I used to with Grunt watch. Meaning, it has to watch less files and js files, lint, merge, compile and refresh the browser once all that is done. I managed to make it work with…
Vallieres
  • 859
  • 7
  • 19
11
votes
4 answers

Gulp.js stops compiling LESS when watched after there has been an error in the LESS files

I'm having a problem with gulp. I run gulp-watch along with gulp-less and gulp-clean. Everything is running perfectly. When I edit somefile.less and I save it with a semi-colon missing or maybe I accidentally leave a trailing ;s, just have errors in…
turbalan
  • 431
  • 3
  • 10
11
votes
3 answers

Gulp + source maps (multiple output files)

I just started playing with gulp, and it's very fast and easy to use but it seems to have a critical flaw: what do you do when a task needs to output more than one type of file? For example, gulp-less says it doesn't even support the…
mpen
  • 272,448
  • 266
  • 850
  • 1,236
8
votes
2 answers

Handling image paths in css files when processed by gulp

Previously in my MVC apps, I've used .NET to optimize (concatenate, minify, etc.) my CSS files. I've had to use custom transform classes to handle paths in my CSS like: .brand { background-image: url("../images/logo.png"); } or even: .brand { …
mellis481
  • 4,332
  • 12
  • 71
  • 118
8
votes
1 answer

Import .css file in Less using nodejs gulp

According to this question it's possible to import css file from less v.1.4.0. I tried to use gulp-less task, and it's not working. There's any way to import css file like this: @import "../spritesheet.css"; with nodeJS gulp?
cheziHoyzer
  • 4,803
  • 12
  • 54
  • 81
7
votes
2 answers

gulp cannot find semantic.json during installation of semantic-ui

I'm trying to install semantic-ui using npm and gulp using this tutorial: http://www.semantic-ui.com/introduction/getting-started.html I run npm install semantic-ui --save and everything's fine. but then I direct into semantic/ folder and run gulp…
Navid777
  • 3,591
  • 8
  • 41
  • 69
7
votes
3 answers

Compiling LESS using gulp-useref and gulp-less?

I'm trying to compile my LESS files using the gulp-useref plugin, but it is as if the gulp-less plugin never outputs a compiled version of my LESS files in the pipeline. The LESS files get concatenated with the other CSS files without being…
joelrobichaud
  • 665
  • 4
  • 19
7
votes
5 answers

Source map is absolute path but Chrome DevTool assumes it's a URL

I am using LESS compiler via a gulp-less in my gulpjs build. I have enabled sourceMap generation, and it kind of works, the proper file names and line numbers are there. The gulp line that generates LESS with source maps is very…
gnz
  • 394
  • 3
  • 10
6
votes
1 answer

gulp-less not creating output css

I've been struggling with this for a few hours now. I have the following in my gulpfile: gulp.task('styles', function() { gulp.src('C:\\TeamCity\\buildAgent\\work\\5003e8de5901599\\dev\\Content\\css\\less\\dealer-landing.less') .pipe(less()) …
Dave4988
  • 705
  • 1
  • 12
  • 20
1
2 3 4 5 6 7 8