Questions tagged [grunt-contrib-less]

Compile LESS files to CSS.

Grunt file to compile LESS files to CSS.

58 questions
1
vote
0 answers

Grunt contrib Less - issue with partial files

I am facing an issue with grunt-contrib-less plugin. Problem Explanation I have multiple less partials files which i am including in a main.less file. My grunt watch listen for changes in less files and run the less task. The problem is grunt…
atul
  • 552
  • 4
  • 16
1
vote
0 answers

Grunt convert multiple less files to corresponding css files

I have 2 less files a.less and b.less. I want to convert them into a.css and b.css using grunt but grunt-contrib-less task concatinates the two files. How can I convert both the less files into their corresponding css files?
Mak
  • 584
  • 1
  • 13
  • 33
1
vote
1 answer

How to compress with grunt-contrib-less without losing the banner text?

I'm trying to compress a bunch of less files using Grunt with the plugin grunt-contrib-less using the option: compress: true But when I run the Grunt task it removes the banner that is actually a comment. banner:'/*\nTheme Name: maugelves.com \n'…
1
vote
1 answer

LESS/Grunt is not writing the sourcemap reference to the end of the compiled CSS

I am using grunt-contrib-less to compile my .less files in to a single CSS stylesheet. Everything is working, except the source map, which I cannot get to work under any circumstances! Here is my Gruntfile: 'use strict'; module.exports =…
Jack
  • 9,615
  • 18
  • 72
  • 112
1
vote
1 answer

Show warnings when extend() is missing base class?

I'm doing some class extensions in Less, but it's silently failing if the class I attempt to extend isn't found. I'd really like to see a warning about that. Is there a way to enable it? .foo { &:extend(.bar); // .bar is undefined, fails…
keithjgrant
  • 12,421
  • 6
  • 54
  • 88
1
vote
1 answer

grunt-contrib-less won't import .css files

My main less file @ private/less/app.less @import 'a.less'; @import 'b.css'; which is importing: private/less/a.less & private/less/b.css My grunt file: module.exports = function(grunt) { grunt.initConfig({ less: { …
Bryan Grace
  • 1,826
  • 2
  • 16
  • 29
1
vote
1 answer

How to run multiple LESS tasks with GruntJS Watch?

I have the following Gruntfile.js. My bootstrap.less file has tons of imports which includes all the plugins' CSS codes as well. Therefore, the bootstrap takes from 5-20 seconds to compile whenever I make a change to any less files. Is there any way…
Suthan Bala
  • 3,209
  • 5
  • 34
  • 59
1
vote
1 answer

Compile LESS files with Grunt from multiple directories into single one, at given path

Using Grunt I would like to compile .less files coming from different dynamic sources into a single .css destination file, at a given path. For instance, my source files are organized this way: app |_ modules |_ module1 | |_…
Matteo Piazza
  • 2,462
  • 7
  • 29
  • 38
1
vote
1 answer

Importance of names 'development' and 'production' in grunt-contrib-less

The example from grunt-contrib-less: less: { development: { options: { paths: ["assets/css"] }, files: { "path/to/result.css": "path/to/source.less" } }, production: { options: { paths: ["assets/css"], …
Mads Skjern
  • 5,648
  • 6
  • 36
  • 40
1
vote
1 answer

Sublime Text 3 and sublime-grunt-build

So i have an error, while i try to build, there is commandline which says: grunt-cli: The grunt command line interface. (v0.1.13) [Finished in 0.1s with exit code 99] [cmd: ['grunt.cmd', '--no-color']] [dir: F:\LavkaLavka\Shop] [path: C:\Program…
1
vote
1 answer

Less SourceMap absolute file paths using Grunt

I have a file structure that looks like this (simplified for brevity): /less/ /styles.less /public/ /css/ /styles.css /styles.css.map /gruntfile.js Gruntfile.js: less: { options: { sourceMap: true, …
dmathisen
  • 2,269
  • 3
  • 36
  • 63
1
vote
1 answer

Can I change .less to a.min.css with a source map and still be able to view the .less files in Dev Tools?

I am using this gruntfile to change my .less file to .css files. module.exports = function (grunt) { grunt.initConfig({ less: { development: { files: [{ expand: true, …
Alan2
  • 23,493
  • 79
  • 256
  • 450
1
vote
0 answers

Difference Between sourceMapRootpath and sourceMapBasepath?

The grunt contrib less plugin has two similar sounding properties with similar descriptions. sourceMapBasepath : Sets the base path for the less file paths in the source map. sourceMapRootpath : Adds this path onto the less file paths in the source…
Code Whisperer
  • 22,959
  • 20
  • 67
  • 85
1
vote
1 answer

Is it possible to work in Chrome developer tools with less files?

Working on the mobile theme for Oxid eshop. I‘m having difficulties to set up a grunt configuration to compile the less files together with a sourcemap, so that I could work with Chrome developer tools. I have latest versions of grunt and npm…
Hanna
  • 23
  • 6
0
votes
1 answer

grunt watch compiled less but not generating css

Grunt watch compiled my LESS file, but is not generating a CSS file. I don't know what the issue is. Can anyone out there help? Here is my grunt code: module.exports = function(grunt)…