UNPKG

create-hydro-app

Version:

Create hydro apps with no build configuration.

15 lines (13 loc) 316 B
import { html, render, setGlobalSchedule } from "hydro-js"; setGlobalSchedule(false); /** * @param {string} file */ export default function fetchAndRun(file) { return fetch(file) .then((e) => e.text()) .then((t) => { render(html`${t}`); }) .catch((e) => console.error(e)); }