HipsterBrown / xs-dev

The quickest way for getting started with JS on devices
https://xs-dev.js.org
MIT License
37 stars 13 forks source link

Interactive `xs-dev include` does not find modules with `manifest_*.json` files #154

Open HipsterBrown opened 8 months ago

HipsterBrown commented 8 months ago

Calling xs-dev include without a full module name will bring up a searchable list of modules from the Moddable SDK by looking for directories containing manifest.json files. We should include these available directories that have .json files that include manifest as part of the file name.

The logic for selecting those directories is found here: https://github.com/HipsterBrown/xs-dev/blob/main/src/toolbox/prompt/choices.ts#L13-L14

This might require some further refactoring to provide the exact file path to the selected manifest rather than defaulting to append manifest.json to the directory path, seen here: https://github.com/HipsterBrown/xs-dev/blob/main/src/commands/include.ts#L57