From 65acce68b6b26246cd64800ef021ba6d7ffc0db6 Mon Sep 17 00:00:00 2001 From: Christian Zimmer Date: Wed, 24 May 2017 13:56:51 +0200 Subject: [PATCH 1/2] Fix opts.pull = false Watchify currently ignores options pull = false. With this fix Watchify is forwarding this option as usePolling = false to chokidar. Without this option chokidar is using too much CPU resources as it is using polling by default on my mac. --- .DS_Store | Bin 0 -> 6148 bytes index.js | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..aa6d8c2c25f645e08fd30ed77ed11c7d50645149 GIT binary patch literal 6148 zcmeHKK}y3w6n)bMthgz-aXH{#>k^zCSa@ zOp@YGME-}Fm;V1>Uh+~h831OwTTFm4fDwn_;E+>KNL@xJ1|cJ4Bj?zxCbM~wZ#$iu z_^S@cvrBM>74A?*&u?gto3*^ivc;~P1Fx5-@9uVLUS2Hr*0$@$e!X<9SKTa$wSLu zJbg54J=!&|N42g+dL|V;4Rt^rPzQc;fNQqI=*Xka>VP_+4%80F`@wPurU5ID?$yD` zZ2^c0(=K={pOnI}0n>n$M^+fdQ;D8x!WP4LI`cO4r2#9Co(>Z>A0{Z9utPCUo#(f% z9r{J&eb8AQXge_UiLtEz7yI}BZJPd82h@Ro8m`} k6dt&xn7y(TpK!Qf-pT<{9 literal 0 HcmV?d00001 diff --git a/index.js b/index.js index 0753b9f..d42436a 100644 --- a/index.js +++ b/index.js @@ -29,6 +29,8 @@ function watchify (b, opts) { wopts.interval = opts.poll !== true ? opts.poll : undefined; + } else if (opts.poll === false) { + wopts.usePolling = false; } if (cache) { From 0277bc7ba0b1f2ab60e2b48e848a58a041607d28 Mon Sep 17 00:00:00 2001 From: Christian Zimmer Date: Wed, 24 May 2017 14:07:18 +0200 Subject: [PATCH 2/2] Removed unneccessary .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index aa6d8c2c25f645e08fd30ed77ed11c7d50645149..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKK}y3w6n)bMthgz-aXH{#>k^zCSa@ zOp@YGME-}Fm;V1>Uh+~h831OwTTFm4fDwn_;E+>KNL@xJ1|cJ4Bj?zxCbM~wZ#$iu z_^S@cvrBM>74A?*&u?gto3*^ivc;~P1Fx5-@9uVLUS2Hr*0$@$e!X<9SKTa$wSLu zJbg54J=!&|N42g+dL|V;4Rt^rPzQc;fNQqI=*Xka>VP_+4%80F`@wPurU5ID?$yD` zZ2^c0(=K={pOnI}0n>n$M^+fdQ;D8x!WP4LI`cO4r2#9Co(>Z>A0{Z9utPCUo#(f% z9r{J&eb8AQXge_UiLtEz7yI}BZJPd82h@Ro8m`} k6dt&xn7y(TpK!Qf-pT<{9