• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

pxt: Microsoft MakeCode (PXT - Programming eXperience Toolkit)

原作者: [db:作者] 来自: 网络 收藏 邀请

Microsoft MakeCode

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 forbeginners, especially focused on computer science education. PXT's underlyingprogramming language is a subset of TypeScript (leaving out JavaScript dynamicfeatures).

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 MakeCode:

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 installnpm 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 rootof 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 thepxt 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 additionto 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 tohttp://localhost:3232/icons.html (this file, along with icons.css containingthe generated WOFF icon font, is created during build).

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

npm install -g svgosvgo 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 andbrowser 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 [email protected] 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 ([email protected]).


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
SkyAPM-php-sdk: The PHP instrument agent for Apache SkyWalking发布时间:2022-02-13
下一篇:
cloverComEXE: 五叶草串口调试助手发布时间:2022-02-13
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap