- Notifications
You must be signed in to change notification settings - Fork36
Convert to TypeScript#26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@developit let me know your thoughts on this, if you would prefer keeping this JS only then I can release something on DefinitelyTyped. I'll do some cleanup and add some docs and JSDoc etc if this is likely to get merge :) |
Nice! This looks great. I might take a crack at a JS + JSDoc + checkJs version of what you have here just to compare, since it seems like most of the typing ends up being for the outward-facing API. |
My master branch does a similar thing with just |
balupton commentedJun 19, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Considering this package has no external dependencies, if a conversion to typescript is done, rather than just js + jsdoc, then this package could usehttps://github.com/bevry/make-deno-edition to make itself compatible with deno (make-deno-edition publishes a |
@developit did you want me to update my master branch to use @balupton Nice! Up to Jason if he wants to support it :) |
developit commentedJun 19, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Editions incurs a substantial install and exec cost, I don't think it's something worth doing for a library that just has two sources. @AndrewLeedham I'll take a look at your master to compare. Sounds like we have a similar preferred setup, haha. |
balupton commentedJun 19, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The make-deno-edition workflow does not use the editions autoloader, so no consumer exec cost: deno consumers would load vhtml via |
@balupton interesting, I didn't know Deno had built-in support for that. Do you know if it's just a static lookup for |
balupton commentedJun 21, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'll clarify this in more detail to come over the coming period, with tutorials and videos, however the quick version is: Deno only supports already resolved paths (e.g. This means that, anything imported into Deno must be directly resolvable and uses ESM. Which means that Deno has no conception of Whatbevry/make-deno-edition does however, is go through your source edition (the directory containing your package's typescript source files), and resolves them all:
With this, Inside the Users of this package who are writing native deno code, can then use that URL directly, or they can just write node, browser, and deno comaptible code by letting That is the essentials. This can be taken and automated further, with utilities likebevry/projectz to automate the README.md instructions, andbevry/boundation to automate the entire package management and compatibility; for instance using all of these, allows the packagestart-of-week to have a custom entry forbrowsers,node, anddeno - with everything else automated, the readme, including theinstallation instructions, which includes thedeno instructions which directs the user to So the most important thing for now, is for |
@developit Any thoughts on the rewrite vs allowJS approaches? |
brkn commentedSep 18, 2020
Is there any updates on this? Any help needed? |
Not really sure, just looking for some guidance from@developit on the approach. |
I followed the wayhttps://github.com/developit/mitt is setup.
This is likely a breaking change as
minified:main": "dist/vhtml.min.js"
no longer exists.Some notes about the changes:
<command/>
since it is obsolete:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/command#Browser_compatibilityempty-tags.d.ts
file (via rimraf) generated by microbundle as that code is bundled via rollup. Not sure if that is a microbundle, rollup-plugin-typescript2 or configuration issue, but I couldn't find a workaround.onClick
withonclick: string
as passing functions is not currently supported: perhaps they can be added back withInterest in supporting react style event handlers? #24fixes:#25,#19