Skip to content

Instantly share code, notes, and snippets.

@DavidMellul
Created August 21, 2018 19:32
Show Gist options
  • Save DavidMellul/96709ef109a619c9056bae2420ca6384 to your computer and use it in GitHub Desktop.
Save DavidMellul/96709ef109a619c9056bae2420ca6384 to your computer and use it in GitHub Desktop.
const gulp = require('gulp');
const less = require('gulp-less');
// Where your Less files are located
const srcDir = './src/assets/style/less';
// Where your CSS files will be generated
const dstDir = './src/assets/style/css';
gulp.task('less', function() {
gulp
.src(`${srcDir}/*.less`)
.pipe(less())
.pipe(gulp.dest(dstDir));
});
gulp.task('default', ['less'], function() {
gulp.watch(`${srcDir}/*.less`, ['less']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment