denoify
dnt
Our great sponsors
denoify | dnt | |
---|---|---|
7 | 10 | |
916 | 1,164 | |
- | 2.6% | |
7.2 | 7.6 | |
3 months ago | 2 days ago | |
TypeScript | Rust | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
denoify
-
Node.js vs. Deno vs. Bun: JavaScript runtime comparison
If you’re building packages/libraries for the community to use you can take a look at Denoify. It’s a project that aims to change some of your files automatically when migrating and make it easier to maintain the project for both npm and deno.land/x.
-
Build package for NPM & Deno
I do Node-first packages and use https://github.com/garronej/denoify to produce deno-compatible code. (example: https://github.com/mxxii/leac )
-
Incomplete list of npm packages adapted for Deno
You can use https://github.com/garronej/denoify for Node-first packages.
-
Ensure you never forget a case in a switch
Or use ts-patten it's comming to Deno soon (thanks to Denoify).
-
Maybe it's time to give Denoify another try. It's much more capable now than when it was first introduced.
So, if you tried Denoify in the past and it didn't work for you, maybe it will now. If you need a hand, I'm happy to help. Just ask anything on the newly opened discussion section of the github repo.
-
λ "Functions all the way down" data validation for JavaScript and TypeScript, now available for deno
It has zero dependencies so was very easy to dual publish on both npm and deno.land using denoify. Literally just needed to add the .ts extension to imports.
dnt
-
Creating an NPM Package in 2024 (Deno, dnt)
We are going to use dnt - Deno to Node Transform tool to build the npm package.
- Ryan Dahl: "our goal is to have Deno be the fastest JS runtime"
-
Build package for NPM & Deno
As already mentioned dnt might help you if you are willing to have deno as your primary development environment. I work in a project like this and the deno tooling is great. I don't even need a package.json since dnt will generate it for me.
-
How to build, test, and publish a TypeScript npm package in 2022
Build it in Deno and then use dnt to create an npm package. That way you support both JS runtimes: https://github.com/denoland/dnt
-
Write once, run anywhere with Deno and Dnt
Specifically, make my codebase be for Deno, use Deno built-in formatter, linter and testing, and use dnt (Deno to Node Transform) to generate an npm package containing ESM code and to test generated code. For testing in the browser, deploy the test content linked to the generated ESM code to Github Pages and use playwright/test. For Cloudflare Workers, use wrangler to set up a worker locally for testing. A schematic diagram is shown below.
- Fresh is a new full stack web framework for Deno
-
tsx: Node.js enhanced with esbuild to run TypeScript & ESM
I ended up building the library with Deno and compiling to Node.js CJS and ESM using https://github.com/denoland/dnt
-
Deno 1.20
Yes, TS code is compiled to run in browsers. You can compile and bundle using `deno bundle` if your project is developed in Deno. Since I'm using Deno for library development, I use the `dnt`[1] tool to compile them into ESM modules later consumed by esbuild in my Node-based projects/toolchains.
[1] https://github.com/denoland/dnt
-
How to compule/bundle code for nodejs?
Maybe this could help? https://github.com/denoland/dnt
What are some alternatives?
nx - Smart Monorepos · Fast CI
klaro-js - Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.
ts-pattern - 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.
ts-runtime-comparison - Comparison of Node.js TypeScript runtimes
tsafe - 🔩 The missing TypeScript utils
tsx - ⚡️ TypeScript Execute: Node.js enhanced to run TypeScript & ESM
react-dsfr - 🇫🇷 Design system React toolkit
undici - An HTTP/1.1 client, written from scratch for Node.js
domain-functions - Decouple your business logic from your framework. With first-class type inference from end to end.
is-bun - Return true if you are running in Bun.
rescript-compiler - The compiler for ReScript.
deno - A modern runtime for JavaScript and TypeScript.