Skip to content

Releases: rossrobino/domco

[email protected]

21 Jan 14:06
39f5918
Compare
Choose a tag to compare

Patch Changes

  • 7ab1dd4: update to tailwindcss v4
  • e110f06: css - light dark color-scheme

[email protected]

09 Jan 18:56
9c742c5
Compare
Choose a tag to compare

Minor Changes

  • 8428e9a: feat: [Injector] adds main method to inject into the main element. A single TagDescriptor can now be provided instead of an array into injection methods.

[email protected]

09 Jan 18:56
9c742c5
Compare
Choose a tag to compare

Patch Changes

[email protected]

06 Jan 21:07
fd7c282
Compare
Choose a tag to compare

Patch Changes

  • f545aa5: fix: sets envDir to cwd by default

[email protected]

02 Jan 16:12
ca5387e
Compare
Choose a tag to compare

Patch Changes

  • ef5ff15: Vite 6 maintenance

    • Fixes auto-reload for SSR only HTML responses - see issue
    • create-domco template defaults to use v6.
    • Updates project dependencies

[email protected]

02 Jan 16:12
ca5387e
Compare
Choose a tag to compare

Patch Changes

  • ef5ff15: Vite 6 maintenance

    • Fixes auto-reload for SSR only HTML responses - see issue
    • create-domco template defaults to use v6.
    • Updates project dependencies

[email protected]

18 Oct 15:04
f0cc3cf
Compare
Choose a tag to compare

Minor Changes

  • 5088e8d: HTML Injector

    Easily manipulate HTML on the server with the Injector helper.

  • Stabilizes the HTML Injector helper

  • Adds Injector tests

    import { Injector } from "domco/injector";
    
    const injector = new Injector(
    	`<!doctype html><html><body><!-- comment --></body></html>`,
    );
    
    injector
    	// Set or change the title
    	.title("My Title")
    	// pass a TagDescriptor
    	.head([{ name: "script", attrs: { type: "module", src: "./script.js" } }])
    	// pass a string of text
    	.body("Prepended to the body! ", "prepend")
    	// replace comments
    	.comment("comment", "My comment")
    	// stringify HTML
    	.toString();

    Produces the following HTML.

    <!doctype html>
    <html>
    	<head>
    		<title>My Title</title>
    		<script type="module" src="./script.js"></script>
    	</head>
    	<body>
    		Prepended to the body! My comment
    	</body>
    </html>

[email protected]

18 Oct 15:07
b2f526e
Compare
Choose a tag to compare

Patch Changes

[email protected]

15 Oct 20:04
69f1349
Compare
Choose a tag to compare

Patch Changes

  • 9605fe3: prerender export can now be a function that returns an array or set of paths to prerender like in react-router v7. This makes it easier to prerender programmatically without having to create another function.

    // src/server/+func.ts
    import type { Prerender } from "domco";
    
    // prerender can still be a value, for example:
    export const prerender: Prerender = ["/prerender"];
    export const prerender: Prerender = new Set(["/prerender"]);
    
    // now prerender can also be a function, for example:
    export const prerender: Prerender = () => ["/prerender"];
    export const prerender: Prerender = async () => new Set(["/prerender"]);

[email protected]

15 Oct 20:04
69f1349
Compare
Choose a tag to compare

Patch Changes