web based script editor and cli tools for norns.
maiden consists of two parts - a backend http server and a frontend single
page web app.
development can either be done directly on the device or on a linux/macos machine.
- Zig 0.17.1 - for the backend
- Node.js - for the frontend (see
web/package.json/.nvmrc)
the simplest way to build is using the included makefile:
make backend # build the backend (native)
make backend-arm # cross-compile for linux arm (norns)
make frontend # release-build the web frontend
make release # build release for linux arm and package in dist/maiden.tgz
make help # show available targetsif you prefer to build manually:
from the backend/ directory in the maiden source tree:
cd backend
zig build
# binary at zig-out/bin/maidenor from the repo root:
make backend
# binary at ./maidenfrom the repo root:
make frontendor from the web/ directory:
yarn install
yarn buildrunning yarn build will output static, bundled, and minified js, css, and html
files suitable for release in the build directory. the built results are self
contained and do not depend on node or any of the associated react toolchain.
if developing on a linux or macos it is trivial to cross compile for arm (raspberry pi):
make backend-arm
# or:
cd backend
zig build -Dtarget=arm-linux-gnueabihf.2.31 -Doptimize=ReleaseSafenote: the release target in tool/release.sh automatically builds for linux
arm.
tip: install FUSE on your linux/macos machine and then mount the device filesystem using sshfs - the build results can then be written directly to the device.
./maiden server --debug --app web/build/ --data <norns_repo>/luaapi tests against a running server:
MAIDEN_BASE_URL=http://127.0.0.1:5000 yarn --cwd api-tests testfor development with the front-end only, using a norns device on the local network as the backend, see web/README.md.
# build backend and frontend
make backend
make frontend
# optional: hot-reload frontend
cd web && yarn start
# run backend in a separate shell
./maiden server --debug --app web/build/ --data ~/dust| tool | version |
|---|---|
| zig | 0.17.1 |
| node.js | see web/package.json / .nvmrc |
| yarn | 1.x (compatible with react-scripts 1.0.17) |