Skip to content

Files

Latest commit

12556bb · Apr 25, 2022

History

History

web

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 25, 2022
Dec 23, 2021
Dec 23, 2021
Dec 23, 2021
Dec 23, 2021
Jan 16, 2022
Dec 30, 2021
Dec 23, 2021
Dec 23, 2021
Dec 23, 2021

README.md

@wasm4/web-devtools

Description

A collection of custom elements that provides information about wasm4 web runtime.

Usage

import { wasm4DevtoolsTagName } from '@wasm4/web-devtools';

const elem = document.createElement(wasm4DevtoolsTagName);
document.body.appendChild(elem);

Themeing

All exported components can be customized using the following css variables:

:root {
  --wasm4-devtools-bg-primary: pink; /* color */
  --wasm4-devtools-bg-secondary: cornflowerblue; /* color */
  --wasm4-devtools-text-primary: black; /* color */
  --wasm4-devtools-text-secondary: gray; /* color */
  --wasm4-devtools-text-text-size: 18px; /* dimension */
  --wasm4-devtools-window-z-index: 15; /* unitless number */
}

Developing

Install dependencies

npm --prefix devtools/web-devtools i

This package relies on lit library to manage custom elements: docs are available here.

Test locally

Starts local server

npm --prefix devtools/web-devtools run dev

Build package & web runtime

npm --prefix devtools/web-devtools/ run build && npm --prefix runtimes/web/ run build

Build package

npm --prefix devtools/web-devtools run build

Run formatter

npm --prefix devtools/web-devtools run prettify

License

MIT