Gathering detailed insights and metrics for esbuild-runner
Gathering detailed insights and metrics for esbuild-runner
Gathering detailed insights and metrics for esbuild-runner
Gathering detailed insights and metrics for esbuild-runner
⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild
npm install esbuild-runner
52.4
Supply Chain
89.5
Quality
75.7
Maintenance
100
Vulnerability
99.3
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
715 Stars
63 Commits
24 Forks
3 Watching
11 Branches
5 Contributors
Updated on 28 Nov 2024
TypeScript (67.25%)
JavaScript (32.21%)
Shell (0.53%)
Cumulative downloads
Total Downloads
Last day
-19.7%
19,119
Compared to previous day
Last week
-8.1%
110,695
Compared to previous week
Last month
7.9%
476,139
Compared to previous month
Last year
29.2%
4,599,505
Compared to previous year
2
1
28
esr
)Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild.
esr makes it easy to run arbitrary code or tests without needing to build your whole project. It's a great way to improve your development workflow.
The easiest way to use esbuild-runner is to install it globally and use the included esr
binary.
1$ esr hello-world.ts
Alternatively, you can require esbuild-runner within any nodejs process to include realtime transpilation:
1$ node -r esbuild-runner/register hello-world.ts
In order to use esbuild-runner with Jest, you need to configure a Jest transform in your jest.config.js
1module.exports = { 2 transform: { 3 "\\.ts$": "esbuild-runner/jest", 4 }, 5}
VSCode Debugging
1{ 2 "version": "0.2.0", 3 "configurations": [ 4 { 5 "name": "Debug with esbuild-runner", 6 "program": "${workspaceFolder}/hello-world.ts", 7 "runtimeArgs": [ 8 "-r", 9 "esbuild-runner/register" 10 ], 11 "request": "launch", 12 "sourceMaps": true, 13 "skipFiles": [ 14 "<node_internals>/**" 15 ], 16 "type": "pwa-node" 17 } 18 ] 19}
esr
provides two different ways to transpile your code:
package.json
or node_modules
will never be transpiled. Running esr
will always transpile the code. No caching is used.--cache
): this method will invoke esbuild for every source file, but will cache the result. This means that the initial run will be slower, but after that, only changed source files will be transpiled.1$ bin/esr.js --help 2Usage: esr [options] <source-file> [file-options] 3 4 --cache Transform on a file per file basis and cache code 5 --clearCache Clear transform cache 6 --help|-h Display this help message 7
To customize the options passed to esbuild, you can create an esbuild-runner.config.js
file in the current directory or one of the ancestor directories.
1// example esbuild-runner.config.js 2module.exports = { 3 type: "bundle", // bundle or transform (see description above) 4 esbuild: { 5 // Any esbuild build or transform options go here 6 target: "esnext", 7 }, 8}
Simply install the esbuild-runner npm package using your favorite package manager.
1$ npm install -g esbuild-runner
1$ npm add --dev esbuild-runner
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 3/26 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
20 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More