tasks/scss.js
function compileSingleFile (filePath, isDebug, options)
{
    var outputPath = "./" + path.dirname(filePath).replace("assets/scss", "public/css");
    gulpUtil.log(gulpUtil.colors.blue("Sass"), pathHelper.makeRelative(filePath), " -> ", outputPath + "/" + path.basename(filePath).replace(/\.scss$/, ".css"));

    var innerPipe = gulp.src(filePath)
        .pipe(plumber());

    if (isDebug)
    {
        innerPipe = innerPipe
            .pipe(watch(filePath));
    }

    innerPipe = innerPipe
        .pipe(sass({
            errLogToConsole: true,
            includePaths: [
                process.env.PWD
            ]
        }))
        .pipe(autoprefixer({
            browsers: options.browsers,
            cascade: false
        }));

    // if not in debug mode, minify
    if (!isDebug)
    {
        innerPipe = innerPipe.pipe(cssMin({
            processImport: false
        }));
    }

    // write auto prefixer
    return innerPipe
        .pipe(gulp.dest(outputPath));
}
function compileSingleFile (filePath, isDebug, options)
{
    var outputPath = "./" + path.dirname(filePath).replace("assets/scss", "public/css");
    gulpUtil.log(gulpUtil.colors.blue("Sass"), pathHelper.makeRelative(filePath), " -> ", outputPath + "/" + path.basename(filePath).replace(/\.scss$/, ".css"));

    var innerPipe = gulp.src(filePath)
        .pipe(plumber());

    if (isDebug)
    {
        innerPipe = innerPipe
            .pipe(watch(filePath));
    }

    innerPipe = innerPipe
        .pipe(sass({
            errLogToConsole: true,
            includePaths: [
                process.env.PWD
            ]
        }))
        .pipe(autoprefixer({
            browsers: options.browsers,
            cascade: false
        }));

    // if not in debug mode, minify
    if (!isDebug)
    {
        innerPipe = innerPipe.pipe(cssMin({
            processImport: false
        }));
    }

    // write auto prefixer
    return innerPipe
        .pipe(gulp.dest(outputPath));
}
function compileSingleFile ( filePath , isDebug , options ) { var outputPath = "./" + path . dirname ( filePath ) . replace ( "assets/scss" , "public/css" ) ; gulpUtil . log ( gulpUtil . colors . blue ( "Sass" ) , pathHelper . makeRelative ( filePath ) , " -> " , outputPath + "/" + path . basename ( filePath ) . replace ( / \.scss$ / , ".css" ) ) ; var innerPipe = gulp . src ( filePath ) . pipe ( plumber ( ) ) ; if ( isDebug ) { innerPipe = innerPipe . pipe ( watch ( filePath ) ) ; } innerPipe = innerPipe . pipe ( sass ( { errLogToConsole : true , includePaths : [ process . env . PWD ] } ) ) . pipe ( autoprefixer ( { browsers : options . browsers , cascade : false } ) ) ; // if not in debug mode, minify if ( ! isDebug ) { innerPipe = innerPipe . pipe ( cssMin ( { processImport : false } ) ) ; } // write auto prefixer return innerPipe . pipe ( gulp . dest ( outputPath ) ) ; }
Compiles a single Sass file

@param {string} filePath
@param {boolean} isDebug
@param {SassTaskOptions} options
@returns {*}
Compiles a single Sass file