commands: Make the --poll flag a duration

So you can do:

```
hugo server --poll 700ms
```

See #8720
This commit is contained in:
Bjørn Erik Pedersen committed 2021-07-05 10:23:29 +02:00
1 parent 13070337a9
commit f2f692c322
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ hugo [flags]
--noChmod don't sync permission mode of files --noChmod don't sync permission mode of files
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--path-warnings print warnings on duplicate target paths etc. --path-warnings print warnings on duplicate target paths etc.
--poll use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem print memory usage to screen at intervals --print-mem print memory usage to screen at intervals
--quiet build in quiet mode --quiet build in quiet mode
--renderToMemory render to memory (only useful for benchmark testing) --renderToMemory render to memory (only useful for benchmark testing)
+1 -1
View File
@@ -46,7 +46,7 @@ See https://gohugo.io/hugo-modules/ for more information.
--noChmod don't sync permission mode of files --noChmod don't sync permission mode of files
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--path-warnings print warnings on duplicate target paths etc. --path-warnings print warnings on duplicate target paths etc.
--poll use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem print memory usage to screen at intervals --print-mem print memory usage to screen at intervals
--templateMetrics display metrics about template executions --templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
+1 -1
View File
@@ -47,7 +47,7 @@ hugo new [path] [flags]
--noChmod don't sync permission mode of files --noChmod don't sync permission mode of files
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--path-warnings print warnings on duplicate target paths etc. --path-warnings print warnings on duplicate target paths etc.
--poll use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem print memory usage to screen at intervals --print-mem print memory usage to screen at intervals
--templateMetrics display metrics about template executions --templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
+1 -1
View File
@@ -59,7 +59,7 @@ hugo server [flags]
--noHTTPCache prevent HTTP caching --noHTTPCache prevent HTTP caching
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--path-warnings print warnings on duplicate target paths etc. --path-warnings print warnings on duplicate target paths etc.
--poll use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
-p, --port int port on which the server will listen (default 1313) -p, --port int port on which the server will listen (default 1313)
--print-mem print memory usage to screen at intervals --print-mem print memory usage to screen at intervals
--renderToDisk render to Destination path (default is render to memory & serve from there) --renderToDisk render to Destination path (default is render to memory & serve from there)