2017-10-01 4 views
0

mon fichier répertoire estSASS fichier ne compilant à css avec gulp SASS

css 
    --nothing yet 
sass 
    --style.sccs 
Gulpfile.js 
index.html 
package.json 

ici est mon Gulpfile.js

'use strict'; 

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

var sassOptions = { 
    errLogToConsole: true, 
    outputStyle: 'expanded' 
}; 

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

gulp.task('watch', function() { 
    return gulp 
    // Watch the input folder for change, 
    // and run `sass` task when something happens 
    .watch('./sass/**/*.scss', ['sass']) 
    // When there is a change, 
    // log a message in the console 
    .on('change', function(event) { 
     console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); 
    }); 
}); 

gulp.task('default', ['sass', 'watch' ]); 

ici est style.sccs

$font-stack: Helvetica, sans-serif; 
$primary-color: #333; 

body { 
    font: 100% $font-stack; 
    color: $primary-color; 
} 

quand je courir gorgée du terminal il semble ok

PS C:\Users\delli\gulpsass> gulp 
[21:02:08] Using gulpfile ~\gulpsass\gulpfile.js 
[21:02:08] Starting 'sass'... 
[21:02:08] Starting 'watch'... 
[21:02:08] Finished 'watch' after 12 ms 
[21:02:08] Finished 'sass' after 41 ms 
[21:02:08] Starting 'default'... 
[21:02:08] Finished 'default' after 43 μs 

cependant mon dossier css est toujours vide

Répondre

1

Ce doit être une faute de frappe. Votre fichier doit être style.scss, et non style.sccs.