dnt | esno | |
---|---|---|
10 | 10 | |
1,164 | 1,533 | |
1.5% | 0.5% | |
7.6 | 4.9 | |
5 days ago | about 2 months ago | |
Rust | TypeScript | |
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.
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
esno
-
Finally, a guide for Node.js and TypeScript and ESM that works
Love this project, used it quite a bit. However I always opt for using esno[1] instead, merely because of the name; having two tools share the same name throws me off.
[1] https://github.com/esbuild-kit/esno
-
The esm/cjs situation...
Next, I thought well nx is not gonna work for now, so let's keep looking for an alternative to ts-node. Oh look, there is this https://github.com/esbuild-kit/tsx. It natively understands path aliases, no need for any flags. Oh wait...it doesn't do any type checking like ts-node. WHAT? why would anyone execute typescript without type checks during development?.
-
Svelte is migrating from TypeScript to JSDoc
I’ve generally found tsx to be better/less hassle than ts-node
https://github.com/esbuild-kit/tsx
-
TypeScript tooling and ecosystem
For just running Typescript files you have (both for dev and prod) https://github.com/esbuild-kit/tsx with command is generally easier then using ts-node + some file watcher or compiling to js
-
Usage TypeScript?
Just use tsx: https://github.com/esbuild-kit/tsx
- What's the proper tools to use for node.js development?
-
PSA: Speed up your ts-node command with a simple --swc flag
I've been using tsx, which is like ts-node except it uses esbuild under the hood. It's been pretty great. Super speedy.
-
tsx: Node.js enhanced with esbuild to run TypeScript & ESM
And compared to esno?
-
Typescript or JS with Node.js ?
Typescript with TSX for development
-
Unable to run ‘.ts’ - ESM modules and CommonJS
Take a look at Typescript runners like ts-node or esno (https://github.com/antfu/esno)
What are some alternatives?
klaro-js - Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.
esbuild-node-tsc - Build your Typescript Node.js projects using blazing fast esbuild
ts-runtime-comparison - Comparison of Node.js TypeScript runtimes
electron-svelte-typescript-esbuild-template - Starter kit to build cross-platform desktop apps with Electron, Svelte, TypeScript and Esbuild.
tsx - ⚡️ TypeScript Execute: Node.js enhanced to run TypeScript & ESM
esbuild-svelte - An esbuild plugin to compile Svelte components
undici - An HTTP/1.1 client, written from scratch for Node.js
TS-ESNode - Node.JS Loader hook to transform typescript source and files as node loads them TS-ESNode. TS-Node for ESNext & ESModule Node.JS.
is-bun - Return true if you are running in Bun.
esbuild-runner - ⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild
deno - A modern runtime for JavaScript and TypeScript.
ThinkJS - Use full ES2015+ features to develop Node.js applications, Support TypeScript.