ArcMoon is a template language. You write .arcm files, and ArcMoon builds them into web pages.
Beta. ArcMoon works, but things may change before 1.0.
A .arcm file holds a page's markup, styles and code. ArcMoon builds it into a web page.
- Markup: blocks like
[p]Hello[end]become HTML elements. Pages are built from components and layouts. - Code at build time: code in
${ }$runs in Node.js while the page is built. It can read files, use npm packages and fill the page with data. - Code in the browser: code in
runtime ${ }$runs in the browser. Live values update the page when their data changes. - Styles: a component's
[style]only styles that component. - Output: plain HTML, with only the CSS and JavaScript each page needs.
[import = Layout: "./Layout.arcm" !]
${ const name = "World"; }$
[Layout = title: "Home"]
[h1]Hello, ${ name }$![end]
[end]Install the arcm command:
npm install -g arcmoonCheck that it works:
arcm -varcmoon and its short name arcm are the same command.
To use ArcMoon from JavaScript, install it in your project instead:
npm install arcmoonArcMoon needs Node.js 20.10 or newer.
MIT © Adam Elmi