Datasheet
There is also another button next to the GitHub sync - you can use it to add new files to the project.
This is mostly to help keep the project organized. For our TypeScript compiler it doesn't matter if you
use one big file or a bunch of smaller ones.
Conflicts
It's possible that multiple people are editing the same package at the same time causing edit conflicts. This is similar to
the situation where the same person edits the package using several computers, browsers, or web sites. In the conflict
description below, for simplicity, we'll just concentrate on the case of multiple people working on the same package.
Typically, two people would sync a GitHub package at the same version, and then they both edit it. The first person
pushes the changes successfully. When MakeCode tries to push the changes from the second person,
it will notice that these are changes against a non-current version. It will create a commit based on the previous version
and try to use the standard git merge (run server-side by GitHub). This usually succeeds if the two people edited
different files, or at least different parts of the file - you end up with both sets of changes logically combined. There is
no user interaction required in that case.
If the automatic merge fails, MakeCode will create a new branch, push the commit there, and then create a pull request
(PR) on GitHub. The dialog that appears after this happens will let you go to the GitHub web site and resolve the
conflicts. Before you resolve conflicts and merge the PR, the master branch will not have your changes (it will have
changes from the other person, who managed to commit first). After creating the PR, MakeCode moves your local
version to the master branch (without your changes), but don't despair they are not lost! Just resolve the conflict in
GitHub and sync to get all changes back. MakeCode will also sync automatically when you close the PR dialog
(presumably, after you resolved the conflict in another tab).
Testing your package
To test blocks in your package, press the New Project button on the home screen and go to the Extensions dialog. It
will list all your GitHub projects as available for addition. Select your package and see what the blocks look like.
You can have one browser tab open with that test project, and another one with the package. When you switch
between them, they reload automatically.
For testing TypeScript APIs you don't need a separate project, and instead can
use the test.ts file in the package itself. It is only used when you run the package
directly, not when you add it to a project. You can put TypeScript test code in there.
© Adafruit Industries
https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-
circuitpython
Page 187 of 199