sass - Generate sourcemap for each partial -
i'm using gulp-sass , each partials manages sourcemap , can using less did not see way sass.
_partial.scss ( within have have mapfile ). _partial2.scss ( ).
according specification sass-lang files starting _
not compilled. see also: https://github.com/sass/node-sass/issues/215
so rename partials gulp-rename:
var sourcemaps = require('gulp-sourcemaps'); var gulp = require('gulp'); var sass = require('gulp-sass'); var rename = require("gulp-rename"); gulp.task('sass', function () { gulp.src('./scss/*.scss') .pipe(sourcemaps.init()) .pipe(rename(function (path) { path.basename = path.basename.replace(/^_/,''); })) .pipe(sass()) .pipe(sourcemaps.write()) .pipe(gulp.dest('./css')); });
Comments
Post a Comment