@allior/wmake-cli
v0.0.2
Published
Streamiby/wmake CLI: build widgets, base64 encode assets, generate fields
Downloads
191
Readme
@allior/wmake-cli
CLI for streamiby / wmake: widget build, base64 encoding, field generation.
Installation
pnpm add -g @allior/wmake-cli
# or from the monorepo:
cd cli && pnpm install && pnpm run buildCommands
wmake widget
Builds chat-demo into widget files (html.txt, js.txt, css.txt, fields.txt, data.txt) and a zip archive in examples/chat-demo/dist.
wmake widget
wmake widget --full # full bundle without CDN (legacy build style)wmake base64
Converts images, videos, and SVG to base64 for use in the browser.
wmake base64 <path> # file or directory
wmake base64 ./assets -o out # output to file or directory
wmake base64 ./img -f # output with extra infowmake generate-fields
Generates fields.json from fields.base.json and test data. Requires the WMAKE_FIELDS_DIR environment variable.
WMAKE_FIELDS_DIR=/path/to/fields wmake generate-fieldswmake extract-test-data
Test data lives in streamelements/src/assets as TS objects; this command is kept for compatibility.
Development
pnpm install
pnpm run build # compile
pnpm run dev # run via tsx (src/index.ts)
pnpm start # run compiled dist/index.js