Skip to content

Instantly share code, notes, and snippets.

@PuercoPop
Last active August 29, 2015 14:17
Show Gist options
  • Save PuercoPop/c9863743eee29a38dd4f to your computer and use it in GitHub Desktop.
Save PuercoPop/c9863743eee29a38dd4f to your computer and use it in GitHub Desktop.
En el directorio del projecto, escribe 'npm install gulp less gulp-less gulp-watch' Luego copia el archivo Gulpfile y desde powershell escribe gulp en powershell. Ahora cuando salves cualquier .less en la carpeta source/static/styles se generaran los .css.
var gulp = require('gulp');
var less = require('gulp-less');
var watch = require('gulp-watch');
gulp.task('minify', function () {
return gulp.src('source/static/styles/*.less')
.pipe(less({})).on('error', function () {})
.pipe(gulp.dest('source/static/styles'));
});
gulp.task('default', function () {
return watch('source/static/styles/*.less', function () {
gulp.start('minify');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment