Watch source-path, library-path, external-library-path and asconfig.json for changes and rebuild.
Probably using this package: https://www.npmjs.com/package/chokidar
EDIT: Royale's compiler natively supports a --watch compiler option. It is supported with asconfigc's --watch option since asconfigc 1.6.0. See commit a3209fd. Other compilers will require a custom solution.