-
Notifications
You must be signed in to change notification settings - Fork 24
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
Won't build scss partials. #20
Comments
Look at the new "options.extra" feature. It will handle this case like so:
If any of the files that extra can see change, then it rebuilds all the files. If I were doing this, I'd change the gulp.src to point to the one source file that includes the others (Main.scss in your example, or a small set of such source files). Otherwise it's building most of the scss files twice. |
Is there a way that only the respective parent file is compiled? |
Not using the "extra" mechanism, no. And given that SASS/SCSS files have complex include structures, you'd need something that understood SASS/SCSS syntax in order to accomplish that. Something like |
I have yet to be able to get this working with partials, only multiple base scss files.
My setup:
Gulp
javascript
var SRC = './stylesheets/**/*.scss';
var DEST = './stylesheets';
gulp.task('sass', function() {
return gulp.src(SRC)
//.pipe(changed(DEST, { extension: '.css' }))
.pipe(newer({ dest: DEST, ext: '.css' }))
.pipe(plumber({
errorHandler: handleErrors
}))
.pipe(sourcemaps.init())
.pipe(sass({}))
.pipe(sourcemaps.write('./'))
.on('error', handleErrors)
.pipe(gulp.dest(DEST))
});
Any saves made inside main.scss will compile a new css file.
However any saves made in any partial, in this particular case any saves made inside of _generic-tool will not compile any css.
Windows 7 64-bit
version gulp-newer 0.5.0
The text was updated successfully, but these errors were encountered: