MithrilJS / mithril.js

A JavaScript Framework for Building Brilliant Applications

Home Page:https://mithril.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there any chance Mithril could run in Deno?

backspaces opened this issue · comments

Mithril.js version: All

Platform and OS: Deno latest

Project: https://github.com/backspaces/agentscript

Is this something you're interested in implementing yourself?

Alas no! :) But I can lend a hand helping with Deno questions and culture

Description

I would prefer creating my sites in Deno

Why

It's javascript usage matches the browser, it uses es6 modules, and it has simpler file management than node.

Possible Implementation

Deno is starting to add node interfaces to aid moving from Node to Deno. Possibly that would help in a Mithril version supporting Deno

Open Questions

Is it something web devs would like? In the javascript world, many devs are migrating to Deno and that may be of interest to your clientele.

I am simply curious, since I have not moved myself to Dino, but is there any specific gap in Mithril.js that has motivated this request?

Hi. I just noticed that the scripts/ use node. If these are only used by Mithril devs, no problem. But if users need to create such scripts, deno would be far easier, due to deno's javascript being much closer to the browser's than node's.

@backspaces Everything in scripts/ is strictly internal. It's even excluded from npm releases.

For end developer use in Deno, I'd recommend using https://deno.land/manual@v1.12.2/npm_nodejs/std_node to load Mithril, since Mithril doesn't currently support ESM natively.

Thanks for the clarification!!