Acrenactive
Acrenactive

Reputation: 7

Fail compile Sass with gulp

I have a problem with my code. it will not compile when I write "Gulp sass" in the console, But nothing happened in my CSS folder. I have been sitting for a long time trying to make it work but it won't want to work for me and I am very grateful if anyone can help me with this

Here is the code:

var gulp = require('gulp');
var sass = require('gulp-sass');


// Compile
gulp.task('sass', function() {
    return gulp.src('./src/Assests/scss/*.scss')
        .pipe(sass())
        .pipe(gulp.dest('./src/Assets/css'));
});`

and in the console it says

gulp sass
[10:41:41] Using gulpfile ~\my-app\gulpfile.js
[10:41:41] Starting 'sass'...
[10:41:41] Finished 'sass' after 8.78 ms`

Upvotes: 0

Views: 75

Answers (2)

Taylor Dondich
Taylor Dondich

Reputation: 658

please make sure the name of the folder is correct. Looks like you have 'Assests' instead of 'Assets'. Note the extra 's'

Upvotes: 0

Michael
Michael

Reputation: 566

Change your code to log errors sass().on('error', sass.logError)

You task:

gulp.task('sass', function() {

    return gulp.src('./src/Assests/scss/*.scss')
        .pipe(sass()
           .on('error', sass.logError)  
        )
        .pipe(gulp.dest('./src/Assets/css'));
});    

Upvotes: 1

Related Questions