Skip to content

Releases: rossrobino/domco

domco@2.2.1

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

create-domco@2.0.12

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

domco@2.2.0

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>

create-domco@2.0.11

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

Patch Changes

domco@2.1.5

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"]);

create-domco@2.0.10

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

Patch Changes

  • 002ca9a: update deno template, mjs/mts vite config no longer required
  • Updated dependencies [9605fe3]
    • domco@2.1.5

domco@2.1.4

09 Oct 20:01
b0ef0f8
Compare
Choose a tag to compare

Patch Changes

  • 8c59699: prerender export can now be a Set in addition to being an Array

create-domco@2.0.9

09 Oct 20:01
b0ef0f8
Compare
Choose a tag to compare

Patch Changes

  • 8c59699: prerender export can now be a Set in addition to being an Array
  • Updated dependencies [8c59699]
    • domco@2.1.4

create-domco@2.0.8

09 Oct 19:32
b57d067
Compare
Choose a tag to compare

Patch Changes

  • 185c105: show warning if the target directory exists and is not empty

create-domco@2.0.7

09 Oct 18:25
c71281d
Compare
Choose a tag to compare

Patch Changes

  • 98b5ecd: update template for deno 2.0