hot restart for dart console application with fast incremental compilation.
why do i need this?
if your console application compiles too long before running, and dart run
, which is now supports incremental compilation, seems too slow.
install
use the dart pub global command to install this into your system.
$ dart pub global activate fire
use
if you have modified your path, you can run this from any local directory.
$ fire
otherwise you can use the dart pub global
command.
$ dart pub global run fire
here’s an example of running a console application:
$ fire bin/cat.dart example/example.dart
> watching 'lib' folder.
> building done, took 0:00:00.000054
void main() {
print('hello cat!');
}
> press r to restart and q to exit.
while running creates bin/cat.dill
incremental kernel snapshot.
todo
- option to change arguments
- builders support
- aot compilation, it’s impossible for now
alternatives
- https://pub.dev/packages/angel3_hot
- https://pub.dev/packages/jaguar_hotreload
- https://pub.dev/packages/hotreloader
- https://pub.dev/packages/recharge
- https://pub.dev/packages/reloader
Comments are closed.