{"name":"esbuild-runner","version":"2.2.1","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":"3.3.0","@types/eslint":"7.28.0","@types/eslint-plugin-prettier":"3.1.0","@types/node":"16.7.6","@types/prettier":"2.3.2","@types/rimraf":"3.0.2","@types/source-map-support":"0.5.4","@typescript-eslint/eslint-plugin":"4.29.3","@typescript-eslint/parser":"4.29.3","devmoji":"2.3.0","esbuild":"0.12.24","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-eslint-comments":"3.2.0","eslint-plugin-import":"2.24.2","eslint-plugin-jest":"24.4.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"3.4.1","eslint-plugin-promise":"5.1.0","eslint-plugin-unicorn":"35.0.0","husky":"7.0.2","jest":"27.1.0","prettier":"2.3.2","release-it":"14.11.5","rimraf":"3.0.2","type-fest":"2.1.0","typescript":"4.4.2","typesync":"0.8.0"},"peerDependencies":{"esbuild":"*"},"dependencies":{"source-map-support":"0.5.19","tslib":"2.3.1"},"gitHead":"6e5d00b931e75fbee343b96980108299bee7e5e2","bugs":{"url":"https://github.com/folke/esbuild-runner/issues"},"homepage":"https://github.com/folke/esbuild-runner#readme","_id":"esbuild-runner@2.2.1","_nodeVersion":"16.4.1","_npmVersion":"7.18.1","dist":{"integrity":"sha512-VP0VfJJZiZ3cKzdOH59ZceDxx/GzBKra7tiGM8MfFMLv6CR1/cpsvtQ3IsJI3pz7HyeYxtbPyecj3fHwR+3XcQ==","shasum":"3866fca62cbf9645e939b43a0c65446f9a53064f","tarball":"http://registry-npm.ywwl.com/esbuild-runner/download/esbuild-runner-2.2.1.tgz","fileCount":27,"unpackedSize":37482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLIDZCRA9TVsSAnZWagAA17AQAKBX7FDoc9Fdw5IPTr8s\n4P7ai/LtfA7WpEcljFm9hLJgfJjzrw6RQ/xUxU51o7Nvs7Djcm872ceJwAw0\nCf+mPinTQYqOdxvIHawXUVqLD07f0fJd3L1XjSfzSOTjTvEeydn8oLNvjpFY\nY4FDlCh6PJu5LPd9TcVjDCE5K3pe7BMXMmQ6m6Ub0lDodY8SrGyh/4iAIEGW\nvth2B1Y7EAOiYxk79Reh249VPfIch8nucBrtYW9CfLbV0z4rrVvnzcTLIyer\nYlMwLrQlVG6zjCDIE9Ju4khc6kCHmA3ljFiUP6qA/SgMvZrSOdOfuEJ6RjqA\n5GmZs+TPymAHT1fdg5mdGDyj+lZU7w9vhhkKVSw/exRPPWo9RVMOhdUSPznj\nQ9eH7oy59COPXsEUmOkYWjbH/ZYGHlZE5H9kBqC4BuMKw+MVHenwRE7CHuAD\nvda0lk+BVxvXHnD1jCAsyZ2LPMMVQd2fIXEA1oXM75x98Lv8eJLg1gK8QoNy\n9su3tu+1avqHnGR56j8XWwrM/9tURRjh18Kcgw1paRtlDb66GDa+LLO3FSbR\nrgyN9oTmwa0Psm3HInHm9wsh3jYCJlOwRSWsWTZqTwEONgg/TXcK0kJS7kuc\nH5D2kQniLTnXRWerTLamO3isetM/XtCmRQas8q8FWepbQ7Ajdk2Gt2ztnB1o\nSLVv\r\n=Jwli\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9c1v/evHcusa1LNjhdufGja/HvBtoAhLXsH5XAxvzZwIhAI150bR3LqorXzE18uHr/itep53E3Tmg5VWLSOV8TG2c"}],"size":12229,"noattachment":false,"key":"/esbuild-runner/-/esbuild-runner-2.2.1.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.1_1630306521128_0.5851477774615548"},"_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":1630306521284,"_cnpm_publish_time":1630306521284,"dist-tags":{"latest":"2.2.2"}}