| 85 | } |
| 86 | |
| 87 | async function run({release, debug, platforms, watch, log, test, version}) { |
| 88 | const regular = Object.keys(platforms).some((platform) => platform !== PLATFORM.API && platforms[platform]); |
| 89 | if (release && regular) { |
| 90 | await build({platforms, version, debug: false, watch: false, log: null, test: false}); |
| 91 | } |
| 92 | if (debug && regular) { |
| 93 | await build({platforms, version, debug, watch, log, test}); |
| 94 | } |
| 95 | if (platforms[PLATFORM.API]) { |
| 96 | await api(debug, watch); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | function getParams(args) { |
| 101 | const argMap = { |