I'm looking for a tool like "gruntjs" which can monitor my dart project, and when file changes, it's able to:
dart app.dart
I don't find any plugin for gruntjs to do this, is there such a tool for dart?
You can use the Dart Editor Build System to build your own tool to this. Whenever a file changes Dart Editor looks for build.dart
at the root of the project and attempts to run the commands in main()
. In your build file you can invoke dart2js on your project, call your custom dart command and do whatever else is involved in building the project. This is how WebUI manages compilation of web components.
For more information on the Dart Editor Build System and for some example build.dart
files see Build.dart and the Dart Editor Build System.