Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gulp = require('gulp'),
- less = require('gulp-less'),
- watch = require('gulp-watch'),
- connect = require('gulp-connect'),
- open = require('gulp-open'),
- path = require('path');
- gulp.task('less', function () {
- return gulp.src('./less/main.less')
- .pipe(less({
- paths: [path.join(__dirname, 'includes')]
- }))
- .pipe(gulp.dest('./css'))
- .pipe(connect.reload());
- });
- gulp.task('watch', function () {
- gulp.watch('./less/**/*.less', ['less']);
- });
- gulp.task('webserver', function () {
- connect.server({
- livereload: true,
- root: ['.', '.tmp']
- });
- });
- gulp.task('open', function() {
- gulp.src('./index.html')
- .pipe(open({
- uri: 'http://localhost:8080'
- }));
- });
- gulp.task('default', ['webserver', 'watch', 'open']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement