@@ -235,7 +235,7 @@ my-buble = (input) ->
235
235
es5 .code
236
236
237
237
browserify-cache = {}
238
-
238
+ extra-time = 0
239
239
get-bundler = (entry ) ->
240
240
b = browserify do
241
241
entries : [entry ]
@@ -256,9 +256,11 @@ get-bundler = (entry) ->
256
256
.. transform (file ) ->
257
257
through (buf , enc , next ) ->
258
258
content = buf .to-string \utf8
259
+ t0 = Date .now!
259
260
try
260
261
# @push "__DEPENDENCIES__ = #{__DEPENDENCIES__}; \n #{content}"
261
262
@ push content .replace /__DEPENDENCIES__/g , JSON .stringify(__DEPENDENCIES__ )
263
+ extra-time += Date .now! - t0
262
264
next!
263
265
catch _ex
264
266
@ emit ' error' , _ex
@@ -329,6 +331,8 @@ gulp.task \browserify, ->
329
331
b-count-- if b-count > 0
330
332
if b-count is 0
331
333
log-info \browserify , " Browserify finished"
334
+ console .log " Extra time: #{ extra-time / 1000 } s"
335
+ extra-time := 0
332
336
first-browserify-done := yes
333
337
b-count := files .length
334
338
console .log " ------------------------------------------"
@@ -474,20 +478,21 @@ gulp.task \dependencyTrack, ->
474
478
dump-file "tmp-browserify-cache", browserify-cache
475
479
*/
476
480
477
- # invalidate all dependencies to refresh __DEPENDENCIES__ string
478
- console .log " === Invalidating all Browserify cache due to commit change: "
479
- console .log " ===" , JSON .stringify(__DEPENDENCIES__ )
480
- processed.length = 0
481
- for f , c of browserify-cache
482
- if f .ends-with " .ls" and f not in processed
483
- processed .push f
484
- # console.log "invalidating : #{f}"
485
- touch .sync f
481
+ unless _browserify_change_flag
482
+ # invalidate all dependencies to refresh __DEPENDENCIES__ string
483
+ console .log " === Invalidating all Browserify cache due to commit change: "
484
+ console .log " " , JSON .stringify(__DEPENDENCIES__ )
485
+ processed.length = 0
486
+ for f , c of browserify-cache
487
+ if f .ends-with " .ls" and f not in processed
488
+ processed .push f
489
+ # console.log "invalidating : #{f}"
490
+ touch .sync f
486
491
487
492
# console.log preparserify-dep-list
488
493
gulp .start \browserify
489
494
_browserify_change_flag := false
490
495
processing := no
491
496
492
497
<~ sleep 1000ms
493
- lo(op )
498
+ lo(op ) unless argv . production
0 commit comments