2017-12-15 23:53:51 +01:00
# Calliope target for Microsoft MakeCode [![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_teal/master/pxt-calliopemini_Push)](https://ci2.dot.net/job/Private/pxt_project_teal/master/pxt-calliopemini_Push)
2016-03-10 23:21:48 +01:00
2017-12-15 23:53:51 +01:00
This target is hosted at https://makecode.calliope.cc.
2016-03-10 23:21:48 +01:00
2017-12-12 20:01:43 +01:00
## Hosted editor and build
2017-12-14 20:24:44 +01:00
2017-12-12 20:01:43 +01:00
Jenkins build: https://ci2.dot.net/job/Private/job/pxt_project_teal/job/master/
2017-08-17 18:25:55 +02:00
### BUILD COMMENTS
- build libs/core/dal.d.ts new requires some meddling, as the `#define` parser does not parse `#ifdef` and thus
has some conflicts with double defines constants
2016-10-12 17:13:15 +02:00
![](http://calliope.cc/content/1-ueber-mini/mini_board.png)
2016-05-19 19:34:24 +02:00
## Local server
2016-07-27 22:15:30 +02:00
The local server allows to run the editor and the documentation from your computer.
2016-05-19 19:34:24 +02:00
### Setup
2016-03-10 23:26:59 +01:00
2016-05-18 18:18:14 +02:00
The following commands are a 1-time setup after synching the repo on your machine.
2016-11-07 22:26:19 +01:00
* See requirements for [pxt ](https://github.com/Microsoft/pxt )
2016-07-27 22:48:57 +02:00
* [clone this repo ](https://help.github.com/articles/cloning-a-repository/ ) to your computer and go in the project folder
```
2016-10-12 17:11:05 +02:00
git clone https://github.com/microsoft/pxt-calliope
2016-10-12 17:13:15 +02:00
cd pxt-calliope
2016-07-27 22:48:57 +02:00
```
2016-07-27 22:28:57 +02:00
* install the PXT command line (add ``sudo`` for Mac/Linux shells).
2016-05-18 18:18:14 +02:00
```
npm install -g pxt
```
* install the dependencies
```
npm install
```
2016-05-19 19:34:24 +02:00
### Running
2016-10-12 17:13:15 +02:00
Run this command to open a local web server (add ``sudo`` for Mac/Linux shells).
2016-05-18 18:18:14 +02:00
```
pxt serve
```
2016-05-27 06:38:11 +02:00
If the local server opens in the wrong browser, make sure to copy the URL containing the local token.
Otherwise, the editor will not be able to load the projects.
2016-10-12 17:13:15 +02:00
If you need modify the `.cpp` files, turn on yotta compilation with the ``-yt`` flag (add ``sudo`` for Mac/Linux shells). On Windows, you must be running
from the ``Run Yotta`` command prompt.
2016-05-27 06:38:11 +02:00
```
pxt serve -yt
```
2016-07-27 22:28:57 +02:00
## Updates
To update your PXT version and make sure you're running the latest tools, run (add ``sudo`` for Mac/Linux shells)
2016-05-19 19:34:24 +02:00
```
2016-06-06 19:14:56 +02:00
pxt update
2016-05-19 19:34:24 +02:00
```
2016-05-18 18:18:14 +02:00
More instructions at https://github.com/Microsoft/pxt#running-a-target-from-localhost
2016-04-08 05:48:00 +02:00
2016-07-28 12:47:45 +02:00
## Testing
The build automatically runs the following:
* make sure the built-in packages compile
* `pxt run` in `libs/lang-test*` - this will run the test in command line runner;
there is a number of asserts in both of these
* `pxt testdir` in `tests` - this makes sure all the files compile and generates .hex files
To test something on the device:
* do a `pxt deploy` in `libs/lang-test*` - they should show `1` or `2` on the screen (and not unhappy face)
* run `pxt testdir` in `tests` and deploy some of the hex files from `tests/built`
The `lang-test0` source comes from the `pxt-core` package. It's also tested with `pxt run` there.
2016-06-21 22:17:42 +02:00
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct ](https://opensource.microsoft.com/codeofconduct/ ). For more information see the [Code of Conduct FAQ ](https://opensource.microsoft.com/codeofconduct/faq/ ) or contact [opencode@microsoft.com ](mailto:opencode@microsoft.com ) with any additional questions or comments.