{"id":13683179,"url":"https://github.com/zaydek/esnode","last_synced_at":"2025-06-21T22:05:51.217Z","repository":{"id":47004609,"uuid":"345140127","full_name":"zaydek/esnode","owner":"zaydek","description":"Run JSX and TypeScript, powered by esbuild.","archived":false,"fork":false,"pushed_at":"2021-09-17T18:21:28.000Z","size":121,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T03:46:03.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaydek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-06T16:26:34.000Z","updated_at":"2023-06-13T05:09:52.000Z","dependencies_parsed_at":"2022-09-19T02:01:26.939Z","dependency_job_id":null,"html_url":"https://github.com/zaydek/esnode","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zaydek/esnode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaydek","download_url":"https://codeload.github.com/zaydek/esnode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesnode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259732406,"owners_count":22903066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:02:03.230Z","updated_at":"2025-06-21T22:05:46.200Z","avatar_url":"https://github.com/zaydek.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# esnode\n\nesnode is the answer to the question: How do I run JSX or TypeScript on the server without build-steps?\n\nesnode builds on [esbuild](https://github.com/evanw/esbuild) and\n[source-map-support](https://github.com/evanw/node-source-map-support) (thanks [@evanw](https://github.com/evanw)!) to\nenable transpilation on-the-fly for `.js`, `.jsx`, `.ts`, and `.tsx` files.\n\nNote that esnode does not type-check at build-time. If this is important to you, you may want to use\n[ts-node](https://github.com/TypeStrong/ts-node) or [Deno](https://github.com/denoland/deno). Note that\n[Deno](https://github.com/denoland/deno) is not largely compatible with the existing Node.js ecosystem. Therefore if\ntype-checking at build-time and interoperability with Node.js is important to you, you may want to use\n[ts-node](https://github.com/TypeStrong/ts-node) or defer to VS Code and or `tsc` for type-checking.\n\n## Installation\n\nTo install esnode, simply install `@zaydek/esnode` and run `./node_modules/.bin/esnode`.\n\n**NPM**\n\n```sh\nnpm i --save-dev @zaydek/esnode\n./node_modules/.bin/esnode [file]\n```\n\n**Yarn**\n\n```sh\nyarn add --dev @zaydek/esnode\n./node_modules/.bin/esnode [file]\n```\n\nFinally, create and run a JSX or TypeScript file:\n\n```ts\n// hello.ts\nfunction hello(who?: string): string {\n\treturn `Hello, ${who ?? \"world\"}!`\n}\n\nconsole.log(hello())\n```\n\n```sh\n% ./node_modules/.bin/esnode hello.ts\nHello, world!\n```\n\nFor convenience, you may want to alias esnode as `alias esnode=./node_modules/.bin/esnode`. To alias esnode globally,\nadd `alias esnode=./node_modules/.bin/esnode` to your `~/.bash_profile`.\n\n## CLI\n\n```sh\n\n esnode [file]\n\n   esnode runs a JavaScript or TypeScript file using the Node.js runtime. This is\n   almost the same as 'node [file]' except that 'esnode [file]' is compatible with\n   '.js', '.jsx', '.ts', and '.tsx' files. You may even interoperate JavaScript and\n   TypeScript.\n\n   Your entry point and its dependencies are transpiled on-the-fly by esbuild.\n   esbuild is configured to not bundle 'package.json' dependencies at build-time;\n   these dependencies use 'require' at runtime.\n\n   Note that '.ts' and '.tsx' files are not type-checked. You may use VS Code or the\n   TypeScript CLI 'tsc' for type-checking. To add the TypeScript CLI, use\n   'npm i --save-dev typescript' or 'yarn add --dev typescript'.\n\n Examples\n\n   % ./node_modules/.bin/esnode hello.ts\n   Hello, world!\n\n   % alias esnode=./node_modules/.bin/esnode\n   % esnode hello.ts\n   Hello, world!\n\n   % STACK_TRACE=true esnode hello.ts\n   Hello, world!\n\n Repositories\n\n   esnode:  https://github.com/zaydek/esnode\n   esbuild: https://github.com/evanw/esbuild\n\n```\n\n## License\n\nLicensed as MIT open source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaydek%2Fesnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaydek%2Fesnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaydek%2Fesnode/lists"}