Last active
October 2, 2016 08:07
-
-
Save delbio/68be1ad3f5b92a879117b2780b8abff0 to your computer and use it in GitHub Desktop.
Basic Gulpfile to manage compile less task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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