Transpile x-tags into Edge.js components
npm install edge-tags

Seamlessly transpile HTML-like tag syntax into native Edge.js components.
Install the package using your preferred package manager:
``sh`
pnpm install edge-tagsor
npm install edge-tagsor
yarn add edge-tags
Register the plugin with your Edge.js instance:
`js
import { Edge } from "edge.js";
import { edgeTags } from "edge-tags";
const edge = Edge.create();
/**
* Register the edge-tags plugin
*/
edge.use(edgeTags);
`
When you write HTML-style custom elements:
`edge
Hello
Hello
World
Footer Content
`
Edge-tags automatically converts it to Edge.js component syntax:
`edge${1 + 2}
@component('button', { class: 'bg-white', a: 'b', foo: bar, baz: })
Hello
@end
@component('card')
@component('card/title')
Hello
@end
@component('card/body')
World
@end
@slot('footer')
Footer Content
@end
@end
@component('diskName::avatar')
@end
`
Edge-tags smartly resolves your component paths based on file structure:
- button.edge → References as "button"components/button.edge
- → References as "components/button"components/button/index.edge
- → References as "components/button/index"
This automatic resolution eliminates path management headaches and ensures your components are always correctly referenced.
- Clone this repository
- Install latest LTS version of Node.js
- Enable Corepack using corepack enablepnpm install
- Install dependencies using pnpm dev`
- Run interactive tests using