GulpJS: less and sass compilation


less and sass compilation

  • Use gulp-less in order to compile less into css before browsing
  • Task will take care of variables, operators, functions, mixins etc in your less file
  • You may use AutoPrefixer to add vendor prefixes

Pre Install:

    npm install --save-dev gulp gulp-load-plugins 


    npm install --save-dev gulp-less gulp-autoprefixer 


    var gulp = require('gulp');
    var $ = require('gulp-load-plugins')({ lazy: true });

    gulp.task('css', function () {
    return gulp
        .pipe($.autoprefixer({ browsers: ['last 2 version', '> 5%'] }))


    gulp css

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s