feat: use import maps instead of deps files (#209)

This commit updates fresh to use import maps instead of deps files in generated projects.
This commit is contained in:
Luca Casonato
2022-05-23 19:35:15 +02:00
committed by GitHub
parent fd1346ed6b
commit 80598d07fd
71 changed files with 188 additions and 141 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
{
"tasks": {
"start": "deno run -A --watch main.ts & deno run -A ../../cli.ts manifest --watch"
}
},
"importMap": "./import_map.json"
}
-1
View File
@@ -1 +0,0 @@
export * from "../../runtime.ts";
-1
View File
@@ -1 +0,0 @@
export * from "../../server.ts";
+5
View File
@@ -0,0 +1,5 @@
{
"imports": {
"$fresh/": "../../"
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
/** @jsx h */
import { h, IS_BROWSER, useState } from "../deps.client.ts";
import { h, IS_BROWSER, useState } from "$fresh/runtime.ts";
interface CounterProps {
start: number;
+1 -1
View File
@@ -4,7 +4,7 @@
/// <reference lib="deno.ns" />
/// <reference lib="deno.unstable" />
import { start } from "./deps.server.ts";
import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
await start(manifest);
+1 -1
View File
@@ -1,5 +1,5 @@
/** @jsx h */
import { h } from "../deps.client.ts";
import { h } from "$fresh/runtime.ts";
import Counter from "../islands/Counter.tsx";
export default function Home() {