File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11var Q = require ( 'q' ) ;
22var _ = require ( 'lodash' ) ;
33var path = require ( 'path' ) ;
4- var Gaze = require ( 'gaze' ) . Gaze ;
4+ var chokidar = require ( 'chokidar' ) ;
55
66var parsers = require ( 'gitbook-parsers' )
77
@@ -17,17 +17,18 @@ function watch(dir) {
1717 toWatch . push ( "**/*" + ext ) ;
1818 } ) ;
1919
20- var gaze = new Gaze ( toWatch , {
21- cwd : dir
20+ var watcher = chokidar . watch ( toWatch , {
21+ cwd : dir ,
22+ ignoreInitial : true
2223 } ) ;
2324
24- gaze . once ( "all" , function ( e , filepath ) {
25- gaze . close ( ) ;
25+ watcher . once ( "all" , function ( e , filepath ) {
26+ watcher . close ( ) ;
2627
2728 d . resolve ( filepath ) ;
2829 } ) ;
29- gaze . once ( "error" , function ( err ) {
30- gaze . close ( ) ;
30+ watcher . once ( "error" , function ( err ) {
31+ watcher . close ( ) ;
3132
3233 d . reject ( err ) ;
3334 } ) ;
Original file line number Diff line number Diff line change 2121 "npmi" : " 0.1.1" ,
2222 "cheerio" : " 0.19.0" ,
2323 "gitbook-plugin-livereload" : " 0.0.1" ,
24- "gaze " : " ~0.5 .1" ,
24+ "chokidar " : " ~1.0 .1" ,
2525 "send" : " 0.2.0" ,
2626 "tiny-lr" : " 0.1.5" ,
2727 "tmp" : " 0.0.24" ,
You can’t perform that action at this time.
0 commit comments