S
S
Sergey Gromov2016-02-23 17:58:56
css
Sergey Gromov, 2016-02-23 17:58:56

Sass plugin @import the entire folder, why doesn't it work?

Installed plugin sassGlob =>> npm sassGlob
Added variable to gulpfile.js

var sassGlob = require('gulp-sass-glob');
    var projectPath = 'd:/Desktop/test';

Added a new task
gulp.task('styles', function () {
    return gulp
        .src(projectPath + '/sass/main.scss')
        .pipe(sassGlob())
        .pipe(sass())
        .pipe(gulp.dest(projectPath + '/sass/app'));
});

This task works only if you comment out the sass file, if it uncomments, it works, but it creates not main.scss but main.css and is also empty.
// .pipe(sass())
Here is the hero of the occasion sass task.
//sass
gulp.task('sass', function() {
    gulp.src(projectPath + '/sass/*.scss')
        .pipe(sass({ outputStyle: 'expanded' }).on('error', sass.logError))
        .pipe(gulp.dest(projectPath + '/css'))
});

tell me what could be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gwenn, 2016-02-23
@gwenn

_main.scss rename to main.scss

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question