This means updating it anytime more devices are added to Moddable SDK, whether or not someone using xs-dev has updated to the latest version of the SDK.
To keep this flag more future-proof than it is today, we can use the same strategy as discovering example projects by searching through the directories of $MODDABLE/build/devices/{device_name}/targets. This search could also be slightly clever by only searching through directories of supported platforms based on querying the development environment, like this.
This should also include the $MODDABLE/build/simulators, the host dev environment (mac, linux, windows), and wasm by default.
The list of available devices that may be selected when passing the
--list-devices
flag to any of the "build" related commands (run
,build
,clean
,debug
) is currently static: https://github.com/HipsterBrown/xs-dev/blob/main/src/toolbox/build/index.ts#L63-L123This means updating it anytime more devices are added to Moddable SDK, whether or not someone using xs-dev has updated to the latest version of the SDK.
To keep this flag more future-proof than it is today, we can use the same strategy as discovering example projects by searching through the directories of
$MODDABLE/build/devices/{device_name}/targets
. This search could also be slightly clever by only searching through directories of supported platforms based on querying the development environment, like this.This should also include the
$MODDABLE/build/simulators
, the host dev environment (mac, linux, windows), and wasm by default.