How to Create a MakeCode Package for Micro:Bit
Thing's You'll Need
First, let's set up our build environment, we'll start by downloading and installing Node.js.
You'll also need a GitHub account. Now go ahead and open any old command prompt and navigate to to where you store your GitHub files (I create a GitHub folder on my C:\ drive so for me this is C:\GitHub). Then go ahead and run the following commands. This installs a few npm packages to use.
npm install npm install jake npm install typings
We'll then clone the PXT directory into our GitHub folder and run these npm packages we just installed. At the end, back out to the GitHub folder once more. This is accomplished with the following commands.
git clone https://github.com/microsoft/pxt cd pxt git checkout npm install typings install jake cd..
We'll then clone in the Micro:Bit target, and install pxt there.
git clone https://github.com/Microsoft/pxt-microbit cd pxt-microbit npm install -g pxt npm install cd..
This should be everything we need to build our project, now let's clone in an existing SparkFun MakeCode package and get started editing it.
git clone https://github.com/sparkfun/pxt-gator-light