{"name":"esbuild-runner","version":"2.2.2","description":"Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild","repository":{"type":"git","url":"git+ssh://git@github.com/folke/esbuild-runner.git"},"main":"lib/index.js","keywords":["esbuild","typescript","commonjs","jest","esnext","cjs","node","nodejs","es6","esm","ts-node"],"bin":{"esr":"bin/esr.js"},"author":{"name":"Folke Lemaitre"},"license":"Apache License 2.0","scripts":{"clean":"rimraf lib","lint":"eslint src --ext .ts,.js --cache","prebuild":"npm run clean && npm run lint","build:ts":"tsc --pretty","build":"npm run build:ts","run":"node ."},"ultra":{"concurrent":["lint","prebuild","build","ultra"]},"release-it":{"hooks":{"before:init":"ultra --color lint","after:bump":"ultra --color build"},"npm":{"publish":true},"git":{"commitMessage":"chore(release): ${version}"},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"conventionalcommits","infile":"CHANGELOG.md"}}},"devDependencies":{"@release-it/conventional-changelog":"5.1.1","@types/eslint":"8.4.6","@types/eslint-plugin-prettier":"3.1.0","@types/node":"18.8.5","@types/prettier":"2.7.1","@types/rimraf":"3.0.2","@types/source-map-support":"0.5.6","@typescript-eslint/eslint-plugin":"5.40.0","@typescript-eslint/parser":"5.40.0","devmoji":"2.3.0","esbuild":"0.15.11","eslint":"8.25.0","eslint-config-prettier":"8.5.0","eslint-plugin-eslint-comments":"3.2.0","eslint-plugin-import":"2.26.0","eslint-plugin-jest":"27.1.1","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"4.2.1","eslint-plugin-promise":"6.1.0","eslint-plugin-unicorn":"44.0.2","husky":"8.0.1","jest":"29.2.0","prettier":"2.7.1","release-it":"15.5.0","rimraf":"3.0.2","type-fest":"3.1.0","typescript":"4.8.4","typesync":"0.9.2"},"peerDependencies":{"esbuild":"*"},"dependencies":{"source-map-support":"0.5.21","tslib":"2.4.0"},"types":"./lib/index.d.ts","gitHead":"d0540290306786103c6385ef79fd1ce338e465bc","bugs":{"url":"https://github.com/folke/esbuild-runner/issues"},"homepage":"https://github.com/folke/esbuild-runner#readme","_id":"esbuild-runner@2.2.2","_nodeVersion":"18.9.1","_npmVersion":"8.19.1","dist":{"integrity":"sha512-fRFVXcmYVmSmtYm2mL8RlUASt2TDkGh3uRcvHFOKNr/T58VrfVeKD9uT9nlgxk96u0LS0ehS/GY7Da/bXWKkhw==","shasum":"4243089f14c9690bff70beee16da3c41fd1dec50","tarball":"http://registry-npm.ywwl.com/esbuild-runner/download/esbuild-runner-2.2.2.tgz","fileCount":27,"unpackedSize":37629,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIElmoCy1QO4QHduQzaoOs6nW7/T48ynP2DhhUJ5pVkuAAiAYSEtLvGkUPyzsJWLdu8f/RYtl4j1ksnHrVMHpz2rwnw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSXl4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7PA/9Gxiygix8ViKw8J09n/oxnhkNPhFWDLuFCxP9DSQ7wi3YtU3p\r\n9NMw+CvLu4Y9nS3rB0q7ooBCbGfI6SAdjtgG7/zQmMYkWNJt6le9nLRuJbfv\r\nmjsWUIJP+09Gjs1ia7ZK2XvfqANNcG/X4HBI9LhRoMCbAPRK96aiLa+HKQvJ\r\nmwkOfwY2RiPrcbyMb+p85QZ4IB1fJZXlBNCoTvPKyI+nfpfvt8C0I1BtGU2C\r\nKSu/M2z/PXBHc9QnxXLR0SPiA8qE6tGWy0HUTXr5vvEDOAkhs4ZfWFmjexJ4\r\nE19flOwwdjA5qG4wBaYjuZwpWUDGFN3lZbEX1/0tH5ZSYgWcIY+7x5MII7gu\r\nROnFwuzhN2IpE4edtNTxWt2Ow/FDPFpNtMNrX+iuRjQ8X+YHqdu5KIytxr0O\r\n7a9CoJQ708fGlMyFk5oMJEzgJx0kFUWzuzbcYFBUX9+dbOQ+4exQXpSnunRq\r\n3FrPZVUCYK4sMH/ffeqVVeHQ4AKx+koAfsIpbL4u/DdW6zx6MpH5TQZgYk+O\r\nvlmxg9NpWoycCMuwK9OQDThoPIjIHG2uJNMKk9cFDZYZXWaErDkSwJPuqj29\r\nI7XD7LyAliu/obdF7vY8IpQ+so0J0peCkHbXqnjSKnk3Md87awsWWL2kaz0E\r\nmA5YXrHeLl25OaA/ym2hvSoxtPx8AUTNdaw=\r\n=d+L9\r\n-----END PGP SIGNATURE-----\r\n","size":12272,"noattachment":false,"key":"/esbuild-runner/-/esbuild-runner-2.2.2.tgz"},"_npmUser":{"name":"flemaitr","email":"folke.lemaitre@gmail.com"},"directories":{},"maintainers":[{"name":"flemaitr","email":"folke.lemaitre@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esbuild-runner_2.2.2_1665759608631_0.21326907039447196"},"_hasShrinkwrap":false,"readme":"# :zap: Esbuild Runner (`esr`)\n\nSuper-fast on-the-fly transpilation of modern JS, TypeScript and JSX using [esbuild](https://github.com/evanw/esbuild).\n\n**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.\n\n## ✨ Usage\n\nThe easiest way to use **esbuild-runner** is to install it globally and use the included `esr` binary.\n\n```shell\n$ esr hello-world.ts\n```\n\nAlternatively, you can _require_ **esbuild-runner** within any nodejs process to include realtime transpilation:\n\n```shell\n$ node -r esbuild-runner/register hello-world.ts\n```\n\nIn order to use **esbuild-runner** with Jest, you need to configure a [Jest transform](https://jestjs.io/docs/en/configuration.html#transform-objectstring-pathtotransformer--pathtotransformer-object) in your `jest.config.js`\n\n```js\nmodule.exports = {\n  transform: {\n    \"\\\\.ts$\": \"esbuild-runner/jest\",\n  },\n}\n```\n\nVSCode Debugging\n\n```JSON\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Debug with esbuild-runner\",\n      \"program\": \"${workspaceFolder}/hello-world.ts\",\n      \"runtimeArgs\": [\n        \"-r\",\n        \"esbuild-runner/register\"\n      ],\n      \"request\": \"launch\",\n      \"sourceMaps\": true,\n      \"skipFiles\": [\n        \"<node_internals>/**\"\n      ],\n      \"type\": \"pwa-node\"\n    }\n  ]\n}\n```\n\n## ⚙️ Configuration\n\n`esr` provides two different ways to transpile your code:\n\n- **bundling** _(default)_: this transpiles the script and all its dependencies in typically one invocation of **esbuild**. Dependencies defined in `package.json` or `node_modules` will never be transpiled. Running `esr` will **always** transpile the code. No caching is used.\n- **transform** _(`--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.\n\n```shell\n$ bin/esr.js --help\nUsage: esr [options] <source-file> [file-options]\n\n  --cache       Transform on a file per file basis and cache code\n  --clearCache  Clear transform cache\n  --help|-h     Display this help message\n\n```\n\nTo 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.\n\n```js\n// example esbuild-runner.config.js\nmodule.exports = {\n  type: \"bundle\", // bundle or transform (see description above)\n  esbuild: {\n    // Any esbuild build or transform options go here\n    target: \"esnext\",\n  },\n}\n```\n\n## 📦 Installation\n\nSimply install the **esbuild-runner** npm package using your favorite package manager.\n\n- globally ...\n\n```shell\n$ npm install -g esbuild-runner\n```\n\n- ... or locally in your project\n\n```shell\n$ npm add --dev esbuild-runner\n```\n\n## 👋 Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## ⚖ License\n\n[Apache 2.0](https://github.com/folke/esbuild-runner/blob/main/LICENSE)\n\n<!-- markdownlint-disable-file MD014 MD033 -->\n","publish_time":1665759608856,"_cnpm_publish_time":1665759608856,"dist-tags":{"latest":"2.2.2"}}