LeanKit-Labs / biggulp

Features and utilities to simplify gulp files
MIT License
3 stars 12 forks source link

Speed up linting and formatting by using more specific paths #12

Closed rniemeyer closed 8 years ago

rniemeyer commented 9 years ago

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.

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
calvinb commented 8 years ago

All good things are worth waiting for.

digitalBush commented 8 years ago

selfie-0