简体   繁体   中英

How to run 'pub build' programmatically?

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM