Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run 'pub build' programmatically?

Tags:

dart

dart-pub

Short (and maybe simple) question: Is it possible, to call pub build programmatically via a dart script?

For now, I'm using: Process.run('pub', ['build'], runInShell: true);. Is there are more elegant way?

like image 474
melmac Avatar asked Jun 17 '26 00:06

melmac


1 Answers

Have a look at the barback package on pub. The docs are available here.

like image 70
Greg Lowe Avatar answered Jun 18 '26 23:06

Greg Lowe



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!