Skip to content

How to include and combine sourceRoot from includePaths #385

@curseshadow

Description

@curseshadow

Hi,

how can i include path from includePaths into sourceRoot?

var config = {
    modulesDir: './node_modules', //Every plugin installed from NPM
    sassPath:   './resources/scss', //Raw SASS
    destCssDir: './resources/dist/css', //Minified and non-minified css
};

gulp.task('sass', function() {
    return gulp.src(config.sassPath + '/**/*.scss')
        .pipe(sourcemaps.init())
        .pipe(sass({
            includePaths: [
                config.modulesDir + '/bootstrap-sass/assets/stylesheets',
                config.modulesDir + '/eonasdan-bootstrap-datetimepicker/src/sass'
            ]
        })
        .on("error", sass.logError))
        .pipe(sourcemaps.write('./', {includeContent: false, sourceRoot: config.sassPath}))
        .pipe(gulp.dest(config.destCssDir)) //Output non-minified CSS
        .pipe(notify({message:'STYLE CSS completed', onLast: true}))
        .on('end', function() {util.beep();});
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions