Sample target for PXT
Перейти к файлу
microsoft-github-policy-service[bot] 14429a6057
Microsoft mandatory file (#12)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2023-01-09 16:05:37 -08:00
docs Refresh pxt-sample (#10) 2022-05-05 13:32:36 -07:00
libs Refresh pxt-sample (#10) 2022-05-05 13:32:36 -07:00
sim Refresh pxt-sample (#10) 2022-05-05 13:32:36 -07:00
theme Refresh pxt-sample (#10) 2022-05-05 13:32:36 -07:00
.gitattributes skeleton code for sample target 2016-03-14 15:56:05 -07:00
.gitignore Enable python, remove package-lock.json 2020-07-06 11:20:00 -07:00
.travis.yml Update node version in travis 2020-07-06 11:20:49 -07:00
LICENSE first drop 2017-08-01 12:39:55 -07:00
README.md Update README.md 2018-06-15 22:18:09 -07:00
SECURITY.md Microsoft mandatory file (#12) 2023-01-09 16:05:37 -08:00
package.json Refresh pxt-sample (#10) 2022-05-05 13:32:36 -07:00
pxtarget.json Enable python, remove package-lock.json 2020-07-06 11:20:00 -07:00
targetconfig.json Removed extra comma from targetconfig.json 2018-10-12 14:40:42 -07:00

README.md

Sample target for a Microsoft MakeCode Editor

This repo contains a sample editor built with Microsoft MakeCode (PXT). The editor is hosted on the GitHub pages at http://microsoft.github.io/pxt-sample/

Build Status Community Discord

If you'd like to start your own editor, fork this repo and fix all the TODOs.

TODOs

  • Fork repo and setup local server (see below)
  • Update metadata in pxtarget.json. Change the id, title, name, etc... to your taste.
  • Update the JavaScript runtime in sim/simulator.ts. If needed add additional JS library under sim/public/** and edit sim/public/simulator.html with additional script tags.
  • Update the APIs in sim/api.ts to use your runtime.
  • Test your editor in the local server
  • run pgk staticpkg --gh --bump to upload a static version to GitHub pages.

Running locally

These instructions allow to run locally to modify the sample.

Setup

The following commands are a 1-time setup after synching the repo on your machine.

  • install node.js

  • install the PXT command line

npm install -g pxt
  • install the dependencies
npm install

Running the local server

After you're done, simple run this command to open a local web server:

pxt serve

After making a change in the source, refresh the page in the browser.

Updating the tools

If you would like to pick up the latest PXT build, simply run

pxt update

More instructions at https://github.com/Microsoft/pxt#running-a-target-from-localhost