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
2021-07-05 10:13:41 +02:00
parent 43a23239b2
commit e31b1d1946
9 changed files with 56 additions and 18 deletions

View File

@@ -51,7 +51,7 @@ hugo [flags]
--noChmod don't sync permission mode of files
--noTimes don't sync modification time of files
--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
--quiet build in quiet mode
--renderToMemory render to memory (only useful for benchmark testing)

View File

@@ -46,7 +46,7 @@ See https://gohugo.io/hugo-modules/ for more information.
--noChmod don't sync permission mode of files
--noTimes don't sync modification time of files
--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
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics

View File

@@ -47,7 +47,7 @@ hugo new [path] [flags]
--noChmod don't sync permission mode of files
--noTimes don't sync modification time of files
--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
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics

View File

@@ -59,7 +59,7 @@ hugo server [flags]
--noHTTPCache prevent HTTP caching
--noTimes don't sync modification time of files
--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)
--print-mem print memory usage to screen at intervals
--renderToDisk render to Destination path (default is render to memory & serve from there)