DenoDDeno
Powered by
berkesB
Denoβ€’3y agoβ€’
23 replies
berkes

use-case: web component development in deno

My use-case is quite simple, really. But I have a hard time finding the tooling to work with it.

- I have plain HTML, say "index.html", some CSS, say "app.css", and some typescript.
- I want to include this typescript in the HTML.
- I want a webserver that reloads the index.html page whenever any of the files changes
- I want to have a build process that transpiles the TS into JS so that I can package this file and possibly some more assets.

The last part is not the hard part. I expect to have to do some custom work for that and that's fine.

The first three are hard for me. I cannot find anything in deno that does this for me.
Note: I don't want a full fledged framework or even static site built from markdown. But if abusing some framework solves my cases, maybe that's fine.

All I want, is to serve, recompile (well, retranspile) and reload a few files on change. I'd exect this to be a very common use-case, so maybe I'm overlooking something obvious? It's very much like the jsfiddle and such out there, except local.
I don't need it integrated in some IDE. Just a single command that fires the dev-server and listens to files being updated (on a linux machine, if that matters).

I've somewhat managed with "trunk" which is aimed at rust/wasm development, but can do the "index.html + app.css + app.js" just fine. Reloading and rebuilding. Just that "building" is limited to minifying and not transpiling typescript to JS.

What am I missing, if anything? Is this something that deno can or wants to do at all?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Use web API's in deno lsp
SkythedragonSSkythedragon / help
3mo ago
starting web development
surajSsuraj / help
8mo ago
Deno + Vite + DenoKV
AndiAAndi / help
2y ago
Newbie question: Web development in Deno 2, and .ts to .js transpiling.
kaltciumKkaltcium / help
15mo ago