Build system

Build Status

This package allows to trigger a build.dart script every time a file is added, changed or removed in the working tree where Build system is launched.

The build.dart script will be called with information about the changed files.

You can use build.dart to post-process changed files, generate other files or drive other aspects of the build system.


Build system invokes build.dart with any of the following command-line flags:

  • --changed=<filename>: Specifies a file that changed and should be rebuilt. One instance of the --changed flag is passed in for every changed (created or modified) file.

  • --removed=<filename>: Specifies a file that was removed and might affect the build. One instance of the --removed flag is passed in for every deleted file.

  • --full: Requests a full build; no incremental information is available.


First activate the package with pub global activate build_system. Now you just need to launch pub global run build_system and the build.dart file will be called at every file creation/modification/deletion.

NB: By default a full build (with --full argument) will be executed at startup. You can skip this behaviour with a --no-full argument.


This package was initially done to get a similar behaviour of the retired Dart Editor with its build.dart.


Apache 2.0