Skip to content

A gulp task that compiles less files including sourcemaps, minifies them and applies the autoprefixer postcss processor.

Notifications You must be signed in to change notification settings

legoheld/lernetz-less-gulp-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

lernetz-less-gulp-task

A gulp task that compiles less files, applies the autoprefixer postcss processor, generates sourcemaps and a minified version.

Usage

The following example will compile all the less files under the folder less into to output folder public. It creates the following files:

  • demo.css - the uncompressed css file including the sourcemap definition
  • demo.min.css - the minified css file
var gulp = require('gulp');
var lessTask = require( 'lernetz-less-gulp-task' );

gulp.task( 'less', lessTask( { name:'demo', desc:'public', src:'less/main.less' } ) );

Options

The task accepts an parameter object with the following attributes:

{
    name: 'name', // the file name of the generated files
    src: 'src/**.ts', // the source parameter for the gulp.src( .. )
    dest: 'public', // the destination used in gulp.dest( .. )
    less: {}, // options for the less compiler used in gulp-less: https://github.com/plus3network/gulp-less#options
	prefixer: { cascade: true } // options for the gulp-autoprefixer: https://github.com/sindresorhus/gulp-autoprefixer#options
}

About

A gulp task that compiles less files including sourcemaps, minifies them and applies the autoprefixer postcss processor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published