Skip to content
Microsoft MakeCode (PXT - Programming eXperience Toolkit)
JavaScript TypeScript CSS HTML Python Shell
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Microsoft -> microsoft (#6056) Oct 12, 2019
.vscode Gulp, TypeScript, and Monaco (#6523) Feb 4, 2020
backendutils Move to TypeScript 2.6.1 (#3559) Dec 11, 2017
cli fast mode for testghpkgs (#7012) May 13, 2020
common-docs Replace 'devdocs' JS links (#7059) May 21, 2020
devops Add script to update cloud settings Oct 3, 2016
docfiles make docs at least take up full window, footer stays at bottom (#6800) Apr 2, 2020
docs removing stencils tool May 21, 2020
libs Deprecating Math.randomRange in favor of randint (#6966) May 5, 2020
localtypings when generating snippets for auto-complete or toolbox; track when we … May 20, 2020
pxt-cli Microsoft -> microsoft (#6056) Oct 12, 2019
pxtblocks Embed icon font in svgs for screenshots (#7053) May 20, 2020
pxtcompiler when generating snippets for auto-complete or toolbox; track when we … May 20, 2020
pxteditor Mobile and tablet editor toolbar fixes (#7045) May 19, 2020
pxtlib Don't auto-complete with unnecessary namespace qualifiers (#7040) May 18, 2020
pxtpy Add spacing around event handlers when converting ts->py; add support… May 15, 2020
pxtrunner don't turn snippets to darkmode in ts (#6973) May 6, 2020
pxtsim Don't fix variable names in breakpoint message (#7006) May 12, 2020
pxtwapp WebUSB cleanup (#6806) Apr 8, 2020
pxtwinrt Lazy reconnect (#6924) Apr 28, 2020
scripts calendar invites in online-learning (ics) (#6768) Mar 26, 2020
svgicons Use Javascript logo instead of curly braces (#6546) Feb 7, 2020
tests Add spacing around event handlers when converting ts->py; add support… May 15, 2020
theme use editor tools colors instead of red / green, padding in tablet view ( May 20, 2020
webapp Add copy/paste support for marquee selections. (#7060) May 21, 2020
.gitattributes adding extensions in gitattributes Jun 15, 2018
.gitignore Fix JS intellisense for global variables (#6855) Apr 16, 2020
.travis.yml run tracetests as part of travis (#6152) Nov 5, 2019
CONTRIBUTING.md Updating information with issue tracker guidance May 23, 2018
LICENSE Update LICENSE Apr 12, 2017
Makefile Add control.dmesg/__log to 'pxt run' (#6642) Feb 27, 2020
README.md gulp watch cli (#6572) Feb 12, 2020
ThirdPartyNotice Updated third party notices (#6632) Feb 25, 2020
gulpfile.js Fix name hints for namespaced functions and enable python decomp suite ( Apr 22, 2020
jakeutil.js Gulp, TypeScript, and Monaco (#6523) Feb 4, 2020
karma.conf.js Support for GitHub Actions build (#6254) Nov 27, 2019
osscg-cart-overrides.json Config files for automated OSS registration (#4380) May 30, 2018
osscg-template.json Config files for automated OSS registration (#4380) May 30, 2018
package.json 5.37.80 May 21, 2020
ptrcheck-ignore Add ignore file for 'pxt ptrcheck' Jul 12, 2016
pxtarget.json Force redirect to /browsers from IE11 regardless of pxtarget (#6640) Mar 2, 2020
tslint.json Turns on strict-null-checking in pxtpy/ (#6125) Nov 9, 2019

README.md

Microsoft MakeCode

Build Status Community Discord

Microsoft MakeCode is based on the open source project Microsoft Programming Experience Toolkit (PXT). Microsoft MakeCode is the name in the user-facing editors, PXT is used in all the GitHub sources.

PXT is a framework for creating special-purpose programming experiences for beginners, especially focused on computer science education. PXT's underlying programming language is a subset of TypeScript (leaving out JavaScript dynamic features).

The main features of PXT are:

  • a Blockly-based code editor along with converter to the text format
  • a Monaco code editor that powers VS Code, editor's features are listed here.
  • extensibility support to define new blocks in TypeScript
  • an ARM Thumb machine code emitter
  • a command-line package manager

More info:

Examples of Editors built with PXT:

Branches

  • master is the active development branch, currently v3.* builds
  • v* is the servicing branch for v*.* builds

Running a target from localhost

Please follow the instructions here.

Linking a target to PXT

If you are modifying your own instance of PXT and want a target (such as pxt-microbit) to use your local version, cd to the directory of the target (pxt-microbit, in our example, which should be a directory sibling of pxt) and perform

pxt link ../pxt

If you have multiple checkouts of pxt, you can do the following:

  • run npm i in pxt and the target
  • in the target, run pxt link ..\some-other-pxt (you may need to update your CLI first by running npm install -g pxt)

If you run npm i afterwards (in either the target or pxt), you might need to repeat these steps.

Build

First, install Node: minimum version 8.

To build the PXT command line tools:

npm install
npm run build

Then install the pxt command line tool (only need to do it once):

npm install -g pxt

After this you can run pxt from anywhere within the build tree.

To start the local web server, run pxt serve from within the root of an app target (e.g. pxt-microbit). PXT will open the editor in your default web browser.

If you are developing against pxt, you can run gulp watch from within the root of the pxt repository to watch for changes and rebuild.

gulp watch

If you are working on the CLI exclusively,

gulp watchCli

Icons

There are a number of custom icons (to use in addition to http://semantic-ui.com/elements/icon.html) in the svgicons/ directory. These need to be 1000x1000px. Best start with an existing one. To see available icons go to http://localhost:3232/icons.html (this file, along with icons.css containing the generated WOFF icon font, is created during build).

If you're having trouble with display of the icon you created, try:

npm install -g svgo
svgo svgicons/myicon.svg

Documentation Highlighting

In the documentation, highlighting of code snippets uses highlight.js (hljs). Currently, the following languages are included:

  • TypeScript
  • Python
  • JavaScript
  • HTML,XML
  • Markdown

If you need to add other languages or update existing ones, you can find the distribution at https://highlightjs.org/download/; select all the languages you want to include (including the ones above!), download and unzip, and finally copy over highlight.pack.js into webapp/public/highlight.js/.

Tests

The tests are located in the tests/ subdirectory and are a combination of node and browser tests. To execute them, run npm run test:all in the root directory.

License

MIT License

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Contact Us

Get in touch

Trademarks

MICROSOFT, the Microsoft Logo, and MAKECODE are registered trademarks of Microsoft Corporation. They can only be used for the purposes described in and in accordance with Microsoft’s Trademark and Brand guidelines published at https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general.aspx. If the use is not covered in Microsoft’s published guidelines or you are not sure, please consult your legal counsel or MakeCode team (makecode@microsoft.com).

You can’t perform that action at this time.