Skip to content

Commit

Permalink
Initial files for MakeCode project
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Aug 17, 2022
1 parent 91f20ae commit f6efda0
Show file tree
Hide file tree
Showing 22 changed files with 41,727 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
index.html linguist-generated=true
assets/index.html linguist-generated=true
assets/js/loader.js linguist-generated=true
assets/js/binary.js linguist-generated=true
assets/version.txt linguist-generated=true
37 changes: 37 additions & 0 deletions .github/workflows/cfg-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check pxt.json

on:
push:
branches:
- 'master'
- 'main'

jobs:
check-cfg:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install -g pxt
pxt target arcade
- name: Checkout current state
run: |
git checkout -- .
git clean -fd
- name: Fix files listed in config if necessary
run: pxt checkpkgcfg
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
continue-on-error: true
with:
title: 'Removing missing files from pxt.json'
commit-message: 'Removing missing files from pxt.json'
delete-branch: true
63 changes: 63 additions & 0 deletions .github/workflows/makecode-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: MakeCode Arcade Release

on:
release:
types:
- created
jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x]

steps:
- uses: actions/checkout@v1
- name: install node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install makecode
run: |
npm install -g pxt
pxt target arcade
- name: build js
run: |
pxt clean
pxt install
pxt build --cloud
- name: build D51
continue-on-error: true
run: |
pxt clean
pxt install --hw samd51
pxt build --hw samd51 --cloud
cp ./built/binary.uf2 binary-d51.uf2
- name: build F4
continue-on-error: true
run: |
pxt clean
pxt install --hw stm32f401
pxt build --hw stm32f401 --cloud
cp ./built/binary.uf2 binary-f4.uf2
- name: build P0
continue-on-error: true
run: |
pxt clean
pxt install --hw rpi
pxt build --hw rpi --cloud
cp ./built/binary.uf2 binary-p0.uf2
- name: bundle all
run: |
cat binary-*.uf2 > built/arcade.uf2
- name: upload bundled
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./built/arcade.uf2
asset_name: arcade.uf2
asset_content_type: application/octet-stream
29 changes: 29 additions & 0 deletions .github/workflows/makecode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: MakeCode

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install -g pxt
pxt target arcade
- name: build
run: |
pxt install
pxt build --cloud
env:
CI: true
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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
}
}
30 changes: 30 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

// A task runner that calls the MakeCode (PXT) compiler
{
"version": "2.0.0",
"tasks": [{
"label": "pxt deploy",
"type": "shell",
"command": "pxt deploy --local",
"group": "build",
"problemMatcher": [ "$tsc" ]
}, {
"label": "pxt build",
"type": "shell",
"command": "pxt build --local",
"group": "build",
"problemMatcher": [ "$tsc" ]
}, {
"label": "pxt install",
"type": "shell",
"command": "pxt install",
"group": "build",
"problemMatcher": [ "$tsc" ]
}, {
"label": "pxt clean",
"type": "shell",
"command": "pxt clean",
"group": "test",
"problemMatcher": [ "$tsc" ]
}]
}
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: deploy

build:
pxt build

deploy:
pxt deploy

test:
pxt test
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@



> Open this page at [https://riknoll.github.io/arcade-split-screen/](https://riknoll.github.io/arcade-split-screen/)
## Use as Extension

This repository can be added as an **extension** in MakeCode.

* open [https://arcade.makecode.com/](https://arcade.makecode.com/)
* click on **New Project**
* click on **Extensions** under the gearwheel menu
* search for **https://github.com/riknoll/arcade-split-screen** and import

## Edit this project ![Build status badge](https://github.com/riknoll/arcade-split-screen/workflows/MakeCode/badge.svg)

To edit this repository in MakeCode.

* open [https://arcade.makecode.com/](https://arcade.makecode.com/)
* click on **Import** then click on **Import URL**
* paste **https://github.com/riknoll/arcade-split-screen** 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/riknoll/arcade-split-screen/raw/master/.github/makecode/blocks.png)

#### Metadata (used for search, rendering)

* for PXT/arcade
<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 changes: 8 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
makecode:
target: arcade
platform: arcade
home_url: https://arcade.makecode.com/
theme: jekyll-theme-slate
include:
- assets
- README.md
Empty file added assets.json
Empty file.
106 changes: 106 additions & 0 deletions assets/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f6efda0

Please sign in to comment.