Initial files for MakeCode project

This commit is contained in:
H. Saw 2022-12-11 10:41:17 +08:00
parent 01b975a7f1
commit 83636085d2
11 changed files with 127 additions and 1 deletions

12
.gitignore vendored
View File

@ -1 +1,11 @@
# Initial
# MakeCode
built
node_modules
yotta_modules
yotta_targets
pxt_modules
_site
*.db
*.tgz
.header.json
.simstate.json

23
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,23 @@
{
"editor.formatOnType": true,
"files.autoSave": "afterDelay",
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/built/**": true,
"**/node_modules/**": true,
"**/yotta_modules/**": true,
"**/yotta_targets": true,
"**/pxt_modules/**": true
},
"files.associations": {
"*.blocks": "html",
"*.jres": "json"
},
"search.exclude": {
"**/built": true,
"**/node_modules": true,
"**/yotta_modules": true,
"**/yotta_targets": true,
"**/pxt_modules": true
}
}

2
Gemfile Normal file
View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
all: deploy
build:
pxt build
deploy:
pxt deploy
test:
pxt test

31
README.md Normal file
View File

@ -0,0 +1,31 @@
> Open this page at [https://buzz-lightsnack-2007.github.io/microbit_compass/](https://buzz-lightsnack-2007.github.io/microbit_compass/)
## Use as Extension
This repository can be added as an **extension** in MakeCode.
* open [https://makecode.microbit.org/](https://makecode.microbit.org/)
* click on **New Project**
* click on **Extensions** under the gearwheel menu
* search for **https://github.com/buzz-lightsnack-2007/microbit_compass** and import
## Edit this project ![Build status badge](https://github.com/buzz-lightsnack-2007/microbit_compass/workflows/MakeCode/badge.svg)
To edit this repository in MakeCode.
* open [https://makecode.microbit.org/](https://makecode.microbit.org/)
* click on **Import** then click on **Import URL**
* paste **https://github.com/buzz-lightsnack-2007/microbit_compass** and click import
## Blocks preview
This image shows the blocks code from the last commit in master.
This image may take a few minutes to refresh.
![A rendered view of the blocks](https://github.com/buzz-lightsnack-2007/microbit_compass/raw/master/.github/makecode/blocks.png)
#### Metadata (used for search, rendering)
* for PXT/microbit
<script src="https://makecode.com/gh-pages-embed.js"></script><script>makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");</script>

8
_config.yml Normal file
View File

@ -0,0 +1,8 @@
makecode:
target: microbit
platform: microbit
home_url: https://makecode.microbit.org/
theme: jekyll-theme-slate
include:
- assets
- README.md

4
main.blocks Normal file
View File

@ -0,0 +1,4 @@
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="pxt-on-start"></block>
<block type="device_forever"></block>
</xml>

1
main.ts Normal file
View File

@ -0,0 +1 @@

27
pxt.json Normal file
View File

@ -0,0 +1,27 @@
{
"name": "microbit_compass",
"version": "0.0.0",
"description": "",
"dependencies": {
"core": "*",
"radio": "*",
"microphone": "*"
},
"files": [
"README.md",
"main.blocks",
"main.ts"
],
"testFiles": [
"test.ts"
],
"public": true,
"targetVersions": {
"target": "5.0.12",
"targetId": "microbit"
},
"supportedTargets": [
"microbit"
],
"preferredEditor": "blocksprj"
}

1
test.ts Normal file
View File

@ -0,0 +1 @@
// tests go here; this will not be compiled when this package is used as an extension.

9
tsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "ES5",
"noImplicitAny": true,
"outDir": "built",
"rootDir": "."
},
"exclude": ["pxt_modules/**/*test.ts"]
}