Skip to main content
Home

latest
This package works with Deno
This package works with Deno
JSR Score
82%
Published
9 months ago (0.0.15)

Smallweb Embed

This package provide a simple way to embed assets in your smallweb application.

Usage

Use the cli to embed assets in your app:

deno run -A jsr:@smallweb/embed frontend/dist dist

Then, from your app, you can import the assets from the generated module:

import embeds from "./dist/mod.ts";

// serve the static assets from the frontend/dist directory
function handler(req: Request) {
    return embeds.serve(req);
}

export default {
    fetch: handler,
}

TODO

  • ETag support

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@smallweb/embed

Import symbol

import * as embed from "@smallweb/embed";
or

Import directly with a jsr specifier

import * as embed from "jsr:@smallweb/embed";