microsoft / pxt-mkc

Command line tool for MakeCode editors
https://microsoft.github.io/pxt-mkc/
MIT License
11 stars 5 forks source link

can not specify local directory for extensions #107

Open akohlsmith opened 1 year ago

akohlsmith commented 1 year ago

mkc init microbit ../my-pxt-jacdac gives the following output:

initializing project for micro:bit
saving main.ts
saving pxt.json
saving tsconfig.json
saving .prettierrc
saving .github/workflows/makecode.yml
using project: /Users/andrew/mkctest/pxt.json
using config: /Users/andrew/mkctest/mkc.json
using editor: https://makecode.microbit.org/beta v5.1.5
resolution of ../my-pxt-jacdac failed (404)

Ok, so let's try with file://, which errors out because it doesn't understand that URI:

unkown repository format, try https://github.com/.../...

Ok, try mkc add -- same results with these two different methods.

If I run the init without the extension, I can add the local directory just fine by editing mkc.json as outlined at https://microsoft.github.io/pxt-mkc/.

It seems that this should be doable from the mkc init and mkc add command lines.

tballmsft commented 3 months ago

see https://github.com/microsoft/pxt-mkc?tab=readme-ov-file#advanced-configuration

add a links section (relative path to extension) in mkc.json such as

    "links": {
        "jacdac": "../../pxt-jacdac"
    },