Skip to content

Auto Build on Changes

Birju Vachhani edited this page Jul 30, 2020 · 1 revision

Watch Directory

Spider can also watch given directory for changes in files and rebuild dart code automatically. Use following command to watch for changes:

spider build --watch

see help for more information:

spider build --help

Smart Watch (Experimental)

The normal --watch option watches for any kind of changes that happens in the directory. However this can be improved my smartly watching the directory. It includes ignoring events that doesn't affect anything like file content changes. Also, it only watches allowed file types and rebuilds upon changes for those files only.

Run following command to watch directories smartly.

spider build --smart-watch
Clone this wiki locally