File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ cat input.css | postcss [OPTIONS] > output.css
6060| ` -s, --syntax ` | ` {String} ` | ` undefined ` | Custom PostCSS Syntax|
6161| ` -t, --stringifier ` | ` {String} ` | ` undefined ` | Custom PostCSS Stringifier|
6262| ` -w, --watch ` | ` {Boolean} ` | ` false ` | Enable Watch Mode|
63- | ` --poll ` | ` {Boolean} ` | ` false ` | Use polling for file watching|
63+ | ` --poll ` | `{Boolean| Number }`| ` 100 ` | Use polling for file watching. Can optionally pass polling interval; default 100 ms |
6464| ` -u, --use ` | ` {Array} ` | ` [] ` | PostCSS Plugins|
6565| ` -m, --map ` | ` {Boolean} ` | ` { inline: true } ` | External Sourcemaps|
6666| ` --no-map ` | ` {Boolean} ` | ` false ` | Disable Sourcemaps|
Original file line number Diff line number Diff line change 9292 type : 'boolean'
9393 } )
9494 . option ( 'poll' , {
95- desc : 'Use polling for file watching' ,
96- type : 'boolean'
95+ desc : 'Use polling for file watching. Can optionally pass polling interval; default 100 ms' ,
9796 } )
9897 . option ( 'x' , {
9998 alias : 'ext' ,
@@ -196,7 +195,10 @@ Promise.resolve()
196195 if ( argv . watch ) {
197196 const watcher = chokidar . watch (
198197 input . concat ( dependencies ( results ) ) ,
199- { usePolling : argv . poll }
198+ {
199+ usePolling : argv . poll ,
200+ interval : argv . poll && typeof argv . poll === 'number' ? argv . poll : 100
201+ }
200202 )
201203
202204 if ( config . file ) watcher . add ( config . file )
You can’t perform that action at this time.
0 commit comments