Skip to content

Instantly share code, notes, and snippets.

@delbio
Last active October 2, 2016 08:07
Show Gist options
  • Save delbio/68be1ad3f5b92a879117b2780b8abff0 to your computer and use it in GitHub Desktop.
Save delbio/68be1ad3f5b92a879117b2780b8abff0 to your computer and use it in GitHub Desktop.
Basic Gulpfile to manage compile less task
{
"name": "basic-less-workflow",
"authors": [
"Fabio Del Bene <[email protected]>"
],
"description": "basic less workflow",
"main": "",
"keywords": [],
"license": "MIT",
"homepage": "",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap-less": "^3.3.4"
}
}
var gulp = require('gulp');
var less = require('gulp-less');
var config = {
file: 'style.less',
dest: 'public/assets/styles'
};
gulp.task('lessc', function () {
return gulp.src(config.file)
.pipe(less())
.pipe(gulp.dest(config.dest));
});
gulp.task('watch', function () {
gulp.watch(config.file, ['lessc']);
});
{
"name": "basic-less-workflow",
"version": "1.0.0",
"description": "basic less workflow",
"main": "index.js",
"directories": {
"example": "examples"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Fabio Del Bene <[email protected]>",
"license": "MIT",
"dependencies": {
"gulp": "^3.9.1",
"gulp-less": "^3.1.0",
"less": "^2.7.1",
"uglify-js": "^2.7.3",
"uglifycss": "0.0.21"
}
}
@import "bower_components/bootstrap-less/less/bootstrap.less";
@icon-font-path: "../../bower_components/bootstrap-less/fonts";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment