Hello i am pretty new to a gulp. The problem is when i run default task with command "gulp" scss files dont compile instead copy to css folder This is my gulpfile.js
var gulp = require('gulp'); var sass = require('gulp-sass'); var autoprefixer = require('gulp-autoprefixer'); var browserSync = require('browser-sync'); var runSequence = require('run-sequence'); gulp.task('browserSync', function() { browserSync({ server: { baseDir: 'app' } }) }) gulp.task('sass', function() { return gulp.src('app/scss/**/*.scss') .pipe(autoprefixer({ browsers: ['last 2 versions'] })) .pipe(gulp.dest('app/css')) .pipe(browserSync.reload({ stream: true })); }) gulp.task('watch', function() { gulp.watch('app/scss/**/*.scss', ['sass']); gulp.watch('app/*.html', browserSync.reload); gulp.watch('app/js/**/*.js', browserSync.reload); }) gulp.task('default', function(callback) { runSequence(['sass', 'browserSync', 'watch'], callback ) })
directory tree
app |-scss |- styles.scss |- _layout.scss |- _homepage.scss |- _profile.scss |- _contact.scss |-css
in styles.scss i have :
$orange: #f29528; $image: "../images/"; @import 'layout'; @import 'homepage'; @import 'profile'; @import 'contact';
gulp-sass
assass
, but I don't see you actually using it. – Josef Engelfrost