-
Notifications
You must be signed in to change notification settings - Fork 34
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
Temp files causing ENOENT errors #36
Comments
that's very weird... try to add the have you tried this? gulp.task('scss-lint', function() {
return gulp.src(['src/styles/**/*.scss', '!**/*_scsslint_tmp*.scss'])
.pipe($.scssLint())
}); |
I've been experiencing a similar issue... I use a similar glob to reference my source in the following task: gulp.task('styles', ['lint:sass'], function() {
return gulp.src(config.styles.src)
.pipe(...
} and have the same glob registered for a watch to trigger my gulp.watch(config.styles.src, ['styles']); This should work such that whenever I change a file, the
As you can see, there is an additional execution of the |
I've managed to work around the issue by extending var EXCLUDE_GLOB = '!!(node_modules)/**/*_scsslint_tmp*'; // !(node_modules) for performance
var gulp_watch = gulp.watch;
gulp.watch = function() {
var src = arguments[0];
src = _.isString(src) ? [src] : src;
if (!_.contains(src, EXCLUDE_GLOB)) {
src.push(EXCLUDE_GLOB);
}
arguments[0] = src;
return gulp_watch.apply(gulp, arguments);
}; The result is the following, as expected:
|
thanks @SpenceDiNicolantonio ! |
@juanfran, I assume these temp files are generated by scss-lint itself and not by gulp-scss-lint. Can you confirm? If this is the case, I'll submit a bug to the scss-lint project. I think these files should be generated in the system's temp folder. |
that's it, |
I think it could be an IDE problem, I use PHPStorm (newest version) and get these weird tmp files for my js files. It's horrible it creates those tmp files inside source dir, and
|
I created an issue at the scss-lint inteliJ plugin |
While my watch task is active and the scss-lint task is run, I sporadically get errors like the following:
I suspect it's because I'm also running the scss-lint plugin for PhpStorm (so I can catch issues even before saving), and that it creates these temp files.
I've excluded them from the
src
in the Gulp task, usinggulp-ignore
, like so:...and have confirmed with
gulp-debug
that the temp files aren't piped to scss-lint – yet I still get these errors from time to time. I haven't found a way to consistently reproduce the error unfortunately. Any ideas?The text was updated successfully, but these errors were encountered: