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
1
vote
4 answers

Laravel Elixir Gulp mix two separate less files

In Laravel 5 I am trying to create two different css files for my frontend site and backend site (cms). The source files are in two different directories. The default value for assets in first the backend elixir.config.assetsDir =…
Klaaz
  • 1,590
  • 3
  • 23
  • 46
1
vote
1 answer

Inline sourcemap (generated with gulp-sourcemaps) not working

This is a bit of a weird one: I've got a gulp task that looks like this: gulp.task('less', function () { gulp.src('./less/main.less') .pipe(sourcemaps.init()) .pipe(less({ plugins: [cleancss] })) .pipe(sourcemaps.write()) //…
1
vote
1 answer

How to detect root files in LESS using gulp compilation

Here is the thing. I have following structure of my LESS files: /less/root.less /less/includes1/*.less (a lot of less files) /less/includes2/*.less (a lot of less files) I am using gulp to compile my LESS files. Source: gulp.task('less', function…
Macejkou
  • 636
  • 3
  • 14
  • 24
1
vote
1 answer

'Gulp watch' event takes double the amount of time to compile less compared to normal 'gulp less' command

I'm having issues with my Gulp 'watch' less function in that it is taking 2x longer to compile the less files compared with the individual less function. When I use 'gulp less' it takes average of 9/10 seconds [12:57:15] Starting…
1
vote
3 answers

gulp-durandal TypeError: req.toUrl is not a function

I try to implement gulp to my durandal project as explain on Durandal gulp doc main.js file is successfully build, but when trying to click something that will open a modal dialog, it will show this error (firefox): TypeError: req.toUrl is not a…
Fariz Azmi
  • 713
  • 1
  • 6
  • 21
1
vote
1 answer

Gulp sourcemaps + different CSS preprocessors?

Here's a simplified version of the task I'm using: g = require 'gulp' $ = require('gulp-load-plugins')() g.task 'vendor:styles', -> sass_filter = $.filter('*.scss') less_filter = $.filter('*.less') …
knite
  • 6,033
  • 6
  • 38
  • 54
1
vote
1 answer

gulp-less produces blank css file when @import exists

I'm trying to use gulp to compile a less file into css. I have this working on another project but not on this one. the task in my gulpfile.js looks like this: gulpfile.js var sourceLess = './app/assets/stylesheets/less'; var sourceJs =…
Ray
  • 3,018
  • 8
  • 50
  • 91
1
vote
2 answers

Starting Gulp with Gulp-less maintain folder structure

I've today started to look at gulp.js to compile my less files etc. I've got it up and running with a task but the compiled files are all placed in the same folder - not maintaining the source hierarchy. Is there a way to ensure that the output…
Ray
  • 3,018
  • 8
  • 50
  • 91
1
vote
0 answers

gulp.watch processes files incorrectly

I'm running a simple script that turns HAML and LESS into PHP and CSS. I'm also using gulp.watch to check up on all the changes I make. Problem: gulp-less and gulp-haml process the files correctly. But when gulp.watch sees a change in the file the…
0
votes
1 answer

Less (CSS) calculations are not being evaluated when executed in a gulp task

I'm working with LESS files, and using gulp to compile the CSS. I've noticed that calculations are not being evaluated. For example, the following less... .footer-bar { a { color: white; display: inline-block; …
awj
  • 7,482
  • 10
  • 66
  • 120
0
votes
1 answer

Chrome workspace not liverefreshing static files with virtualhosts

I am working with compiled static css files on chrome workspace. I am using gulp-less workflow for the compilation process from less to css and live editing less files to get expected css output on chrome workspace via dev tools. Everything worked…
Shashank Bhatt
  • 717
  • 1
  • 11
  • 28
0
votes
0 answers

Combine multiple less file using gulp and convert to css

I have multiple less files as you can see below: master.less @import "_a"; @import "_b"; _a.less @x: 12px; _b.less body { font-size: @x; } And i using this gulp task to combine all above less file and then convert that to single css…
Rasool Ghafari
  • 4,128
  • 7
  • 44
  • 71
0
votes
1 answer

gulpfile compile only the last file

I have website that using LESS files. My gulpfile.js is looks like this: var gulp = require("gulp"); var fs = require("fs"); var less = require("gulp-less"); var watchLess = require('gulp-watch-less2'); var embedTemplates =…
No1Lives4Ever
  • 6,430
  • 19
  • 77
  • 140
0
votes
0 answers

Gulp-less 4.0.1 and Gulp 4.0.0 don't create output css

I have Gulp 4.0.0, gulp cli 3.9.1 and gulp-less 4.0.0 installed. I understand that gulp-less 4.0.1 requires gulp 3.x. The question is "How to use less with gulp 4?" Console and gulp-util doesn't show any bugs, but it looks like less task is…
0
votes
0 answers

Sort CSS Declaration Order in gulp-lesshint

I want to create a rule in lesshint to sort the CSS properties as per declaration order like this: "sort-order": [ [ "font", "font-family" ], [ "top", "position" ], [ "color" ] ] it's not working well. It does not…
mahil
  • 33
  • 10