Answer the question
In order to leave comments, you need to log in
How to work with stream in Gulp.js?
There is a code:
var gulp = require('gulp'),
ftp = require('gulp-ftp'),
sass = require('gulp-sass');
gulp.task('sass', function() {
return gulp.src('./src/**/*.scss')
.pipe(sass({
outputStyle: 'expanded',
indentType: 'tab',
indentWidth: 1,
sourceComments: false
}))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('./build/'))
.pipe(gulpif(project.ftp.upload, ftp({
host: project.ftp.host,
user: project.ftp.username,
pass: project.ftp.password,
remotePath: project.ftp.remotePath
})))
.pipe(browserSync.stream());
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question