@accuser/svelte-hast
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Svelte Hast

Transform Hast into Svelte components.

Installing

Add the @accuser/svelte-hast package dependency to your Svelte / SvelteKit project:

npm install --save-dev @accuser/svelte-hast

Usage

<script lang="ts">
	import Hast from '@accuser/svelte-hast';
	import { u } from 'unist-builder';

	const ast: import('hast').Root = u('root', [
		u('element', { tagName: 'h1', properties: {} }, [u('text', 'Hello, World!')])
	]);
</script>

<Hast {ast} />

Test

npm test

License

MIT

Copyright

Copyrigth © 2024 Matthew Gibbons

Readme

Keywords

Package Sidebar

Install

npm i @accuser/svelte-hast

Weekly Downloads

5

Version

0.3.0

License

MIT

Unpacked Size

7.47 kB

Total Files

19

Last publish

Collaborators

  • accuser