Hardware:
- Raspberry Pi 4 (4GB RAM)
- Micro SD card 32GB
- 2x Integral USB 3.1 flash drives 128GB
OS:
- Raspbian Buster
| module Tauri.File { | |
| fun download (file : File) : Promise(Never, Void) { | |
| if (`window.__TAURI__`) { | |
| ` | |
| new Promise(async (resolve, reject) => { | |
| const path = | |
| await Tauri.dialog.save({ defaultPath: #{File.name(file)} }) | |
| if (path) { | |
| const contents = |
| .PHONY: build | |
| build: bin/mint | |
| .PHONY: spec | |
| spec: | |
| crystal spec --error-on-warnings --error-trace --progress | |
| .PHONY: spec-cli | |
| spec-cli: build | |
| crystal spec spec_cli/*_spec.cr spec_cli/**/*_spec.cr --error-on-warnings --error-trace --progress |
| component Counter { | |
| state counter = 0 | |
| fun increment { | |
| next { counter: counter + 1 } | |
| } | |
| fun decrement { | |
| next { counter: counter - 1 } | |
| } |
| # If you do not have OpenSSL installed, update | |
| # the following line to use "http://" instead | |
| source 'https://rubygems.org' | |
| gem 'fron', git: 'https://github.com/digitalnatives/fron', ref: '8963f672aab4221b3a8d434ac75490cda606d164' | |
| gem 'nostromo-ui', git: 'https://github.com/digitalnatives/nostromo-ui', branch: 'main' | |
| gem 'quality_control', git: 'https://github.com/digitalnatives/quality-control' | |
| gem 'haml', '>= 4.0.5' | |
| gem 'middleman', '4.0.0.alpha.6' |
| ## Parser | |
| The parser has been spead up some thanks to @asterite #537 and it should parse | |
| twice as fast and should consume half the memory in the general case. | |
| ## Type Checker | |
| - Fixed a bug in scoping #529 | |
| ## Language Server |
| component Main { | |
| state mobile : Bool = false | |
| use Provider.MediaQuery { | |
| query = "(max-width: 1000px)", | |
| changes = | |
| (matches : Bool) : Promise(Never, Void) { | |
| next { mobile = matches } | |
| } | |
| } |
| class Cors | |
| include HTTP::Handler | |
| getter origin : String | |
| def initialize(@origin) | |
| end | |
| def call(context) | |
| context.response.headers["Access-Control-Allow-Methods"] = "GET, PUT, POST, DELETE, LOAD, PATCH" |
| component Main { | |
| fun render : Html { | |
| <div> | |
| <a | |
| role="button" | |
| class="navbar-burger" | |
| data-target="navMenu" | |
| aria-label="menu" | |
| aria-expanded="false"> |
| store Store { | |
| state counter : Number = 0 | |
| fun increment : Void { | |
| next { counter = counter + 1 } | |
| } | |
| fun decrement : Void { | |
| next { counter = counter - 1 } | |
| } |