Closed u01jmg3 closed 10 years ago
I'll have to try and recreate. Though I'm just using the steam as I get it.
Sent with AquaMail for Android http://www.aqua-mail.com
On May 8, 2014 1:59:29 PM Jonathan Goode notifications@github.com wrote:
Can't seem to only upload files that have changed after minification.
e.g.
var gulp = require('gulp'); var plumber = require('gulp-plumber'), changed = require('gulp-changed'), minifycss = require('gulp-minify-css'), sftp = require('gulp-sftp'), gutil = require('gulp-util') ; var src = './src/', dist = './dist/'; var srcStyles = src + '**/*.css'; var distStyles = dist + '**/*.css'; var host = 'ftp.xxxx.xx.xx', auth = 'keyMain', remotePath = 'public_html'; /*------------------------------------------------*/ var onError = function(error){ gutil.beep(); console.log(error); }; /*------------------------------------------------*/ gulp.task('compilecssremote', function(){ gulp.src(srcStyles) .pipe(plumber({ errorHandler: onError })) .pipe(changed(dist)) //must be dist .pipe(minifycss({keepBreaks: true})) .pipe(gulp.dest(dist)) ; }); gulp.task('uploadcss', function(){ gulp.src(distStyles) .pipe(plumber({ errorHandler: onError })) .pipe(changed(dist)) .pipe(sftp({ host: host, auth: auth, remotePath: remotePath })) ; }); gulp.task('mainremote', function(){ gulp.start('compilecssremote'); }); gulp.task('watchremote', function(){ gulp.watch(srcStyles, ['compilecssremote']); gulp.watch(distStyles, ['uploadcss']); }); /*------------------------------------------------*/ gulp.task('default', ['mainremote', 'watchremote']);
Reply to this email directly or view it on GitHub: https://github.com/gtg092x/gulp-sftp/issues/6
Let me know if you need me to test/clarify anything. Thanks
Managed to fix this: https://github.com/gulpjs/gulp/issues/465#issuecomment-43213352
Can't seem to only upload the file that has changed after CSS minification.
e.g.