Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any documentation about build.dart?

Tags:

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?

like image 513
Paul Brauner Avatar asked Jan 26 '26 13:01

Paul Brauner


2 Answers

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

like image 58
Alexandre Ardhuin Avatar answered Jan 28 '26 03:01

Alexandre Ardhuin


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

like image 27
Zdeslav Vojkovic Avatar answered Jan 28 '26 02:01

Zdeslav Vojkovic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!