We found that we could get a considerable speed boost in linting and formatting by being more specific about the files being included. Including all js files and then excluding node_modules and other paths takes gulp.src considerably longer.
removed sourcePaths as it did not seem to be used
updated sources default to be more specific
removed exclude, as the format and lint tasks no longer need that option
We are also using gulp-file-cache to only lint/format changed files, but I did not include that in this PR, as it writes a cache file that would need to be added to any projects .gitignore. This functionality can easily be added, if it is desired.
As an example, here is running gulp format on seriate:
Before:
[15:25:56] Starting 'jshint'...
[15:25:57] Finished 'jshint' after 1.02 s
[15:25:57] Starting 'format'...
[15:25:58] Finished 'format' after 908 ms
After:
[15:26:20] Starting 'jshint'...
[15:26:21] Finished 'jshint' after 456 ms
[15:26:21] Starting 'format'...
[15:26:21] Finished 'format' after 367 ms
We found that we could get a considerable speed boost in linting and formatting by being more specific about the files being included. Including all js files and then excluding
node_modules
and other paths takesgulp.src
considerably longer.sourcePaths
as it did not seem to be usedsources
default to be more specificexclude
, as theformat
andlint
tasks no longer need that optionWe are also using
gulp-file-cache
to only lint/format changed files, but I did not include that in this PR, as it writes a cache file that would need to be added to any projects.gitignore
. This functionality can easily be added, if it is desired.As an example, here is running
gulp format
onseriate
:Before:
After: