Paul Brauner
Paul Brauner

Reputation: 1347

Is there any documentation about build.dart?

Based on how web_ui projects work, it looks like the IDE will run any build.dart file in the project as soon as some file is changed (or saved?). Is there any documentation about what arguments are passed to that script by the IDE?

Upvotes: 3

Views: 263

Answers (2)

Alexandre Ardhuin
Alexandre Ardhuin

Reputation: 76183

There's now an article on Build.dart and the Dart Editor Build System available on http://www.dartlang.org.

Upvotes: 2

Zdeslav Vojkovic
Zdeslav Vojkovic

Reputation: 14581

I couldn't find any official documentation, so this information is taken from build implementation in web_ui/component_build.dart, valid for version 0.5.3_r22223:

here are the arguments that build function understands:

  • clean - delete all generated files
  • machine - use machine readable format (json) for output
  • changed - list of file which have been changed
  • removed - file which has been removed
  • full - rebuild all files

When one or more files are changed of deleted, the editor calls build.dart script with arguments --machine and list of changed/removed files, e.g.:

arguments when some files were changed:

--machine --changed=web\out\webui_test.css --changed=web\out\webui_test.dart

arguments when some files were removed:

--machine --removed=web\xclickcounter.dart --removed=web\xclickcounter.html

Of course, one call can contain both changed and removed files.

BTW, if you want to stop automatic building, just right click on build.dart file in files explorer window of the editor, and click Don't run build.dart

Upvotes: 2

Related Questions