I am using gulp-sass
module to compile scss files to css files.
This is my gulpfile.js
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
return gulp.src('sass/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('css'));
});
I have two files in my sass folder:
sass
|--- _test.scss
|--- demo.scss
The plugin compiles demo.scss file but not _test.scss , I tried with same content as well.
Is there something with the naming convention or I need to change my gulpfile.js.
You need to change _test.scss
to test.scss
.
Node sass ignores _filenames
. Usually we use _
with files names which are going to be imported in the scss
files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.