Created
November 14, 2016 08:00
-
-
Save alexd73/2de686d4f422627897dfa655203ef2dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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 less = require('gulp-less'); | |
var gulp = require('gulp'); | |
var browserSync = require('browser-sync').create(); | |
var ftp = require( 'vinyl-ftp' ); | |
var gutil = require( 'gulp-util' ); | |
gulp.task('less', function () { | |
var conn = ftp.create( { | |
host: '*****.ru', | |
user: '*****', | |
password: '******', | |
parallel: 10, | |
log: gutil.log | |
} ); | |
gulp.src('./less/style.less') | |
.pipe(less()) | |
.pipe(gulp.dest('./css')) | |
.pipe(conn.dest('www/****.site/themes/ladno/css/')) | |
.pipe(browserSync.stream()); | |
}); | |
gulp.task('browser-sync', function() { | |
browserSync.init({ | |
proxy: '****.site' | |
}); | |
gulp.watch("less/**/*.less", ['less']); | |
gulp.watch(['app/*.html']).on('change', browserSync.reload); | |
}); | |
gulp.task('default', ['browser-sync']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment