This repository was archived by the owner on Dec 18, 2023. It is now read-only.
File tree 3 files changed +12
-7
lines changed
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 15
15
"adm-zip" : " ^0.5.5" ,
16
16
"cliff" : " ^0.1.10" ,
17
17
"command-line-args" : " ^5.1.1" ,
18
+ "debounce" : " ^1.2.1" ,
18
19
"node-fetch" : " ^2.6.1" ,
19
20
"node-watch" : " ^0.7.2" ,
20
21
"prompts" : " ^2.4.0" ,
Original file line number Diff line number Diff line change 1
1
const fs = require ( 'fs' )
2
2
const { execSync } = require ( 'child_process' )
3
+ const nodeWatch = require ( 'node-watch' ) ;
4
+ const debounce = require ( 'debounce' )
3
5
const getLivestormPluginInformation = require ( '../helpers/getLivestormPluginInformation' )
4
6
const env = process . argv [ 3 ]
5
- const nodeWatch = require ( 'node-watch' ) ;
6
-
7
7
8
8
function updatePlugin ( evt , name ) {
9
- console . log ( '%s changed' , name ) ;
9
+ console . log ( 'Updating plugin' ) ;
10
10
process . stdout . write ( '\x1b[0m.\x1b[0m' )
11
11
12
12
try {
@@ -30,10 +30,9 @@ module.exports = function watch() {
30
30
nodeWatch ( './' , {
31
31
recursive : true ,
32
32
filter : ( f , skip ) => {
33
- if ( / \/ n o d e _ m o d u l e s / . test ( f ) ) return skip ;
34
- if ( / \/ b u i l d / . test ( f ) ) return skip ;
35
- if ( / \/ \. g i t / . test ( f ) ) return skip ;
33
+ if ( / n o d e _ m o d u l e s / . test ( f ) ) return skip ;
34
+ if ( / .g i t / . test ( f ) ) return skip ;
36
35
return true
37
36
} ,
38
- } , updatePlugin ) ;
37
+ } , debounce ( updatePlugin , 300 ) ) ;
39
38
}
Original file line number Diff line number Diff line change 69
69
resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
70
70
integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI=
71
71
72
+ debounce@^1.2.1 :
73
+ version "1.2.1"
74
+ resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
75
+ integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==
76
+
72
77
73
78
version "0.1.8"
74
79
resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
You can’t perform that action at this time.
0 commit comments