diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 00000000..aa3b3544 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,17 @@ +# Command Line Interface + +```sim +basic.forever(() => { + basic.showString("CLI<3") +}) +``` + +It is possible to use the codethemicrobit tools from a command line interface (CLI). The PXT CLI allows to +* edit, compile or deploy JavaScript programs +* can easily be integrated in most IDEs. It comes with built-in support for [Visual Studio Code](/code)! +* run a local web server for the web editor +* author packages using JavaScript and/or C++ + +Using the CLI assumes that you have some experience with programming and will require to install tools on your machine as well. + +* **[LET'S GET STARTED](https://pxt.io/cli)** diff --git a/docs/code.md b/docs/code.md index 550a9eae..73a27430 100644 --- a/docs/code.md +++ b/docs/code.md @@ -1,54 +1,16 @@ # Visual Studio Code -Visual Studio Code is a Free Open Source code editor that you can use to edit your programs. +[Visual Studio Code](https://code.visualstudio.com) is a Free Open Source code editor that you can use to edit your programs. Working from Visual Studio code allows you to benefit from all the features of a professional IDE while working with PXT: working with files, git integration (or source control of your choice), hundreds of extensions. -![](https://code.visualstudio.com/home/home-screenshot-win-lg.png) +* background compilation +* auto-completion +* pxt command line integration -## Setup +**Follow [these instructions](https://pxt.io/cli)** to setup your machine and edit your programs in Visual Studio Code. -Follow these instructions to setup your machine and edit your programs in Visual Studio Code. +![](/static/mb/vscode.png) -* install [Visual Studio Code](https://code.visualstudio.com/) -* install [Node.JS](https://nodejs.org/en/) -* install the PXT Tools (on Mac or Linux, you might have to add ``sudo`` to the command). -``` -pxt install -g pxt -``` -* create a folder for your projects -``` -mkdir microbit -``` -* install the microbit target -``` -pxt target microbit -``` - -That's it! You are ready to create new projects in code or open existing projects. - -## Creating a new project - -Open a shell to your ``microbit`` folder. - -``` -# create a new subfolder for your project -mkdir myproject -cd myproject -# start the project set -pxt init -# open code -code . -``` - -## Opening an existing project - -You can extract a project from the embedded URL or .hex file. Open a shell to your projects folder - -``` -# extract the project from the URL -pxt extract EMBEDURL -``` -where ``EMBEDURL`` is the published project URL. \ No newline at end of file diff --git a/docs/docs.md b/docs/docs.md index 0b1a1b50..5c3c848c 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -26,4 +26,5 @@ ### Developers +* [Command Line Interface](/cli) * Learn about [packages](/packages) diff --git a/docs/static/mb/vscode.png b/docs/static/mb/vscode.png new file mode 100644 index 00000000..035686f8 Binary files /dev/null and b/docs/static/mb/vscode.png differ diff --git a/package.json b/package.json index e9ce74ad..454ca73c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.3.54", + "version": "0.3.55", "description": "micro:bit target for PXT", "keywords": [ "JavaScript",