Added option to force watch to use polling
This commit is contained in:
parent
862b69c640
commit
5745eb9be8
|
@ -67,6 +67,7 @@ module Jekyll
|
||||||
c.option 'future', '--future', 'Publishes posts with a future date'
|
c.option 'future', '--future', 'Publishes posts with a future date'
|
||||||
c.option 'limit_posts', '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
|
c.option 'limit_posts', '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
|
||||||
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
|
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
|
||||||
|
c.option 'force_polling', '--force_polling', 'Force watch to use polling'
|
||||||
c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
|
c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
|
||||||
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
|
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
|
||||||
c.option 'quiet', '-q', '--quiet', 'Silence output.'
|
c.option 'quiet', '-q', '--quiet', 'Silence output.'
|
||||||
|
|
|
@ -69,7 +69,11 @@ module Jekyll
|
||||||
|
|
||||||
Jekyll.logger.info "Auto-regeneration:", "enabled"
|
Jekyll.logger.info "Auto-regeneration:", "enabled"
|
||||||
|
|
||||||
listener = Listen.to(source, :ignore => ignored) do |modified, added, removed|
|
listener = Listen.to(
|
||||||
|
source,
|
||||||
|
:ignore => ignored,
|
||||||
|
:force_polling => options['force_polling']
|
||||||
|
) do |modified, added, removed|
|
||||||
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
n = modified.length + added.length + removed.length
|
n = modified.length + added.length + removed.length
|
||||||
print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "
|
print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "
|
||||||
|
|
Loading…
Reference in New Issue