diff --git a/bin/stylemark b/bin/stylemark index 254df07..3549847 100755 --- a/bin/stylemark +++ b/bin/stylemark @@ -17,7 +17,7 @@ var delay = (watch === true) ? 2000 : watch; var browser = args.b; var port = _.isNumber(browser) ? browser : null; -var generate = _.throttle( +var generate = _.debounce( function() { console.log('Generating style guide...'); stylemark({ @@ -26,7 +26,8 @@ var generate = _.throttle( configPath: configPath, }); }, - delay + delay, + { leading: false, trailing: true } ); generate();