Kevin Tale
Kevin Tale
DDeno
Created by Kevin Tale on 11/25/2024 in #help
cannot publish package to jsr but it uses a shared file
So this is my setup
workspace/
packages/
foo/
deno.json
mod.ts
deno.json
utils.ts
workspace/
packages/
foo/
deno.json
mod.ts
deno.json
utils.ts
foo/mods imports the utils file like so import { resolveFromRoot } from "../../utils.ts"; foo deno.json is
{
"name": "foo",
"version": "0.0.1",
"exports": "./mod.ts",
"license": "MIT",
"publish": {
"include": [
"mod.ts",
"deno.json"
]
}
}
{
"name": "foo",
"version": "0.0.1",
"exports": "./mod.ts",
"license": "MIT",
"publish": {
"include": [
"mod.ts",
"deno.json"
]
}
}
but when publishing I got error[invalid-path]: path is not in publish directory I understand the error but what is the solution to this? thanks!
3 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
Consider this super simple codebase
app/
index.html
main.ts
app/
index.html
main.ts
// main.ts
const content = Deno.readTextFileSync("./index.html");

Deno.serve(() => new Response(content, {
headers: { "Content-Type": "text/html" },
})
);
// main.ts
const content = Deno.readTextFileSync("./index.html");

Deno.serve(() => new Response(content, {
headers: { "Content-Type": "text/html" },
})
);
// index.html
<p>Hello world</p>
// index.html
<p>Hello world</p>
Then I run deno run -A -r --watch main.ts. http://localhost:8000/ will correctly serve my html content but how can I enable somekind of live reload where if I edit my index.html in VSCode it will effectively show the updated index.html in my browser? thanks
30 replies