microsoft / microsoft/pxt-microbit
Question: How can local dependencies be referenced in pxt.json
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Hello,
When developing my micro:bit v2 application using TypeScript, I forked an external dependency on GitHub to make a few changes that I want to propose as a Pull Request.
Now I need to link that local dependency to my application to test my changes.
In the pxt.json, dependencies are defined in this fashion:
{
"dependencies": {
"core": "*",
"sonarbit": "github:elecfreaks/pxt-sonarbit#v1.0.9"
}
}
I tried to change the above to:
{
"dependencies": {
"core": "*",
"sonarbit": "local:../pxt-sonarbit"
}
}
However, when running mkc build, I got
Exception: Error: Error: extension sonarbit is missing pxt.json
The pxt.json file is there. Even when changing the relative path to an absolute path, the same happened.
I know it's possible to achieve what I'm after in the online MakeCode editor. Is the same possible locally when using mkc?
The online editor is so inconvenient for day-to-day development.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the application pxt.json and the mkc build command, reproducing the failure with the local:../pxt-sonarbit dependency and checking the referenced dependency's pxt.json. Done means the local fork can be referenced and built successfully with mkc, or the supported limitation and workflow are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100