The MakeCode editor allows users to publish their own extensions and tutorials that can then be used in the editor. This is useful for publishing drivers for accessories or other useful pieces of hardware, as well as adding new software features. The MakeCode team have published a guide to build your own extensions and a guide to writing tutorials
Adding an extension
To add an extension, go to the settings ⚙️ menu and choose Extension from the dropdown. You can pick from the gallery or search for an extension
Only packages on the approved extension list are visible in the MakeCode Editor on makecode.microbit.org. If the Extension is published on Github, it is possible to paste the URL in the extension search box and the editor will find it and allow anyone to add it to their project.
Extension approval process
The extension must meet specific requirements around documentation and stability because it's important that our users have a great experience when learning with the micro:bit.
Once we are satisfied that your extension meets requirements (see this example repo), we will submit a Pull Request to the pxt-microbit GitHub Repository to update the following files with your information:
A member of the team will comment on the Pull Request asking the MakeCode team to approve.
Extension approval requirements
Before you submit your extension for approval, check that it meets the following requirements:
|This extension supports a commercially available micro:bit accessory or sensor that is for Educational use and is in alignment with the Foundation's mission statement
|The accessory has been submitted for listing on the microbit.org website. Use the form here https://form.jotformeu.com/83453273451355
|The extension is primarily written in English (block translations are very welcome)
|The extension is MIT licensed. This licensing is easy to understand and use and ensures sustainability.
|The exenstion does not make use of mBed and uses CODAL/DAL
|The README contains a link to the product page or blog entry.
|The README contains well-commented examples of use, using TypeScript or embedded editor elements, rather than screengrabs/images
|Blocks are lowercased unless they refer to acronyms.
|Blocks have tooltips and links to online help using the Makecode Markdown system.
|The extension is in a finished state. Extensions that are in development should be marked 'beta' in the repository description.
|You have provided a test suite (test.ts) within the extensions(s). The test suite should be comprehensive enough that if Microsoft (who run MakeCode) or the Micro:bit Educational Foundation make any underlying changes to the way the micro:bit compilation happens, we can be sure that your programs and blocks will still work.
|Tests should cover all functionality and be documented so that it's clear how to test it, what to expect and what it is considered a pass/fail. If should not throw errors in the simulator if it is using non simulated hardware.
|You are a member of the micro:bit development community on Slack and have joined the #makecode and #makecode-pkg-owners channels.
|The repository contains an icon.png to aid search. (Please ensure the icon is 300 x 200pixels and less than 100Kb in size as users will need to download it)
|Ensure the filenames and extensions listed in pxt.json eg test.ts exactly match those in the repository.
NB: In exceptional circumstances we may approve extensions that don’t meet all these criteria, or choose not to approve extensions for any reason.
Supporting micro:bit V1 and V2 boards in your extension
If your extension is designed to work on both micro:bit V1 and V2 board versions and you need to differentiate between the two for specific functions, you should do so by using the hardware version API within your script.
If you have a specific function that only works on a V2 board, you should place this within a 'micro:bit V2' subcategory.
Tutorial approval process
Authors will provide an email address and contact number to the Foundation
Authors will join a #tutorial-authors slack channel