Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to include and combine sourceRoot from includePaths #385

Open
curseshadow opened this issue Jun 22, 2021 · 0 comments
Open

How to include and combine sourceRoot from includePaths #385

curseshadow opened this issue Jun 22, 2021 · 0 comments

Comments

@curseshadow
Copy link

curseshadow commented Jun 22, 2021

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();});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant