Comments (8)
that's very weird... try to add the verbose
options and see what prints..
have you tried this?
gulp.task('scss-lint', function() {
return gulp.src(['src/styles/**/*.scss', '!**/*_scsslint_tmp*.scss'])
.pipe($.scssLint())
});
from gulp-scss-lint.
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 styles
task:
gulp.watch(config.styles.src, ['styles']);
This should work such that whenever I change a file, the lint:sass
task is run, followed by the styles
task; however, whenever I change a file, I see the following output:
[13:21:41] Starting 'lint:sass'...
[13:21:41] gulp-debug: app/modules/header/header-component_scsslint_tmp9067563165859372843.scss
[13:21:41] gulp-debug: 1 items
[13:21:41] gulp-notify: [Compile Error] Input file did not exist or was not readable
[13:21:41] Finished 'lint:sass' after 246 ms
[13:21:41] Starting 'styles'...
[13:21:41] Starting 'lint:sass'...
[13:21:41] gulp-debug: app/modules/header/header-component.scss
[13:21:41] gulp-debug: 1 items
[13:21:42] Finished 'lint:sass' after 1.08 s
[BS] Reloading Browsers...
[13:21:43] Finished 'styles' after 2.29 s
As you can see, there is an additional execution of the lint:sass
task somehow, with header-component_scsslint_tmp9067563165859372843.scss
included in the stream.
from gulp-scss-lint.
I've managed to work around the issue by extending gulp.watch
to add an exclusion to the passed glob:
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:
[13:45:36] Starting 'lint:sass'...
[13:45:36] gulp-debug: app/modules/header/header-component.scss
[13:45:36] gulp-debug: 1 items
[13:45:37] Finished 'lint:sass' after 406 ms
[13:45:37] Starting 'styles'...
[BS] Reloading Browsers...
[13:45:39] Finished 'styles' after 2.51 s
from gulp-scss-lint.
thanks @SpenceDiNicolantonio !
from gulp-scss-lint.
@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.
from gulp-scss-lint.
that's it, gulp-scss-lint
doesn't create any tmp file
from gulp-scss-lint.
I think it could be an IDE problem, I use PHPStorm (newest version) and get these weird tmp files for my js files.
Yes .js
not .scss
...
It's horrible it creates those tmp files inside source dir, and scsslint
for js files does not make any sense...
tasks/docs-scripts_scsslint_tmp1537225672253761620.js
tasks/scripts-bundle_scsslint_tmp4377624646903046346.js
from gulp-scss-lint.
I created an issue at the scss-lint inteliJ plugin
idok/scss-lint-plugin#45
from gulp-scss-lint.
Related Issues (20)
- newKey is not defined HOT 2
- error indicates scss-lint not installed, but it is HOT 1
- bundle exec version says Unexpected token T HOT 3
- failReporter and gulp.watch don't work together HOT 7
- Upgrade vinyl-fs dependency to ^2.4.0 HOT 1
- Support for JUnit as output format
- Display message when no error was found HOT 2
- Generic error when the gem is not installed HOT 5
- Fatal Undefined Error HOT 4
- command prompt The input line is too long. HOT 2
- Input file did not exist or was not readable HOT 1
- Command line usage error - XML Format HOT 1
- No such file or directory error in macOS High Sierra HOT 4
- Drop dependency on deprecated "gulp-util"
- gulp-util is deprecated HOT 1
- Unhandled rejection Error: Invalid glob argument thrown when src option used HOT 1
- [Error] 'scss-lint' is not recognized as an internal or external command HOT 3
- Depends on compromised package "event-stream" HOT 5
- scss-lint returns undefined when there aren't errors in files HOT 2
- "OS Command Injection" critical alert
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-scss-lint.