Apologies if this is a redundant, I couldn't find anything similar enough to help my issue...
I'm running Gulp 4 on a Mac (OSX 10.12.6).
Node 10.15.3
NPM 6.4.1
Gulp-SASS 4.0.2
When I make a change on a partial (whether in the main, or sub-directory) if the character count of the document remains the same, Gulp is run from the watch task, but the new CSS output doesn't compile.
Ex.
If I change font-size: 9px to 10px, it compiles
If I change font-size: 9px to 8px, it does not compile (even though Gulp runs the task)
If I save a handful of changes that are the same length, it does not compile.
If I then make a change that changes the character difference of the document by one character and save, it does compile.
Standard (non-partial) scss files do not seem to exhibit the behavior. When saved, the output file will then pick up any non-compiled changes from the partials.
Again, apologies if this is some confusion on my part in the setup, or if it's a redundant issue. Please let me know if I can provide any additional details or better examples.
Thank you.
gulpfile.js:
'use strict';
// Requirements
const gulp = require('gulp'),
sass = require('gulp-sass'),
outputDir = 'builds/dev/';
// Source Locations
var paths = {
styles: {
src: ['src/sass/**/*.scss'],
dest: outputDir + 'css/'
},
scripts: {
src: ['src/scripts/vendors/*.js','src/scripts/*.js'],
dest: outputDir + 'js/'
}
};
/* css */
function styles(cb) {
return gulp.src(paths.styles.src)
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(paths.styles.dest));
cb();
}
/* JavaScript */
function scripts(cb) {
return gulp.src(paths.scripts.src, { sourcemaps: true })
.pipe(gulp.dest(paths.scripts.dest))
cb();
}
function watch(cb) {
gulp.watch(paths.scripts.src, scripts);
gulp.watch(paths.styles.src, styles);
cb();
}
var build = gulp.parallel(styles, scripts, watch);
exports.styles = styles;
exports.scripts = scripts;
exports.watch = watch;
exports.build = build;
/*
* Define default task that can be called by just running `gulp` from cli
*/
exports.default = build;
Apologies if this is a redundant, I couldn't find anything similar enough to help my issue...
I'm running Gulp 4 on a Mac (OSX 10.12.6). Node 10.15.3 NPM 6.4.1 Gulp-SASS 4.0.2
When I make a change on a partial (whether in the main, or sub-directory) if the character count of the document remains the same, Gulp is run from the watch task, but the new CSS output doesn't compile.
Ex. If I change
font-size: 9px
to10px
, it compiles If I changefont-size: 9px
to8px
, it does not compile (even though Gulp runs the task) If I save a handful of changes that are the same length, it does not compile. If I then make a change that changes the character difference of the document by one character and save, it does compile.Standard (non-partial) scss files do not seem to exhibit the behavior. When saved, the output file will then pick up any non-compiled changes from the partials.
Again, apologies if this is some confusion on my part in the setup, or if it's a redundant issue. Please let me know if I can provide any additional details or better examples. Thank you.
gulpfile.js: