{"name":"esbuild-runner","version":"1.1.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 jest.js register.js","lint":"eslint src --ext .ts,.js --cache","prebuild":"npm run clean && npm run lint","build:dts":"tsc --declaration --emitDeclarationOnly --pretty","build:js":"esbuild --platform=node --bundle --outdir=lib --sourcemap --target=es2017 --external:esbuild src/index.ts src/cli.ts","build:jest":"esbuild --platform=node --bundle --outfile=jest.js --target=es2017 --external:esbuild src/jest.ts","build:register":"esbuild --platform=node --bundle --outfile=register.js --target=es2017 --external:esbuild src/register.ts","build":"npm run build:dts; npm run build:js; npm run build:jest; npm run build:register","run":"node ."},"husky":{"hooks":{"prepare-commit-msg":"npx devmoji -e --lint"}},"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":"2.0.0","@types/eslint":"7.2.6","@types/eslint-plugin-prettier":"3.1.0","@types/node":"14.14.10","@types/prettier":"2.1.5","@types/rimraf":"3.0.0","@typescript-eslint/eslint-plugin":"4.9.0","@typescript-eslint/parser":"4.9.0","devmoji":"2.1.12","eslint":"7.15.0","eslint-config-prettier":"7.0.0","eslint-plugin-eslint-comments":"3.2.0","eslint-plugin-import":"2.22.1","eslint-plugin-jest":"24.1.3","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"3.2.0","eslint-plugin-promise":"4.2.1","eslint-plugin-unicorn":"23.0.0","husky":"4.3.5","jest":"26.6.3","prettier":"2.2.1","release-it":"14.2.2","rimraf":"3.0.2","type-fest":"0.20.2","typescript":"4.1.2","typesync":"0.8.0"},"dependencies":{"esbuild":"^0.8.20"},"gitHead":"4caeafd768f0d88dfb1dda5d5ab5d9076ce7acde","bugs":{"url":"https://github.com/folke/esbuild-runner/issues"},"homepage":"https://github.com/folke/esbuild-runner#readme","_id":"esbuild-runner@1.1.1","_nodeVersion":"15.3.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-hDJogM1jYGs7HUvEfb69Th1Y1OhIweea4y9W3Utted9CQ27sdF1XN8K8uIcwnHTt9ECgG+c1hj+gMJu7QqmnYg==","shasum":"8811da06b5da8889f779c48195c93b9bcb5cad74","tarball":"http://registry-npm.ywwl.com/esbuild-runner/download/esbuild-runner-1.1.1.tgz","fileCount":17,"unpackedSize":50089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzjiGCRA9TVsSAnZWagAAtPoP/3zVymu/0LUkYr+st0C5\nGJffeqOHmy1DW+mvxWSLSL2/2mcKQmusFJdmyDG37mH9ORMx9oiWDQMhZlbi\nomEd+//z/vqkmYRQYjWlSWcEn6QNPdqvVL2xLB+089i3oT3KodgQTkwDTyMn\nuf/MCirO4M3mVn3ZTN4KR8DR9EaoJPi9uJyIWYbkVibwmE3mLou2e8o/hdU5\ntd1IAISnga5tUKyHd/10OVcdOCciABtLHOlEjTdPt1iC8sgzp1SoDACF5ObJ\nmyvqqi9nKw0O8mrG3No1l1CtJ1tttsutJnK6McIpkYC3rqMB4oQZSb31o9i6\ngMueDOwQiAJWUHMtH6l1u9XbSZ+zhRGmj1EsVwugXmyYH3FrLUrHi0AlDVhX\nJ/7TrDSl0BKuVHidsg2pW/jP98uhQ+szcoXrYQbbopvBjYVaYroaZYRTYVE3\nLoByDJletICwwBnGNllVFp1TJTp6717OfnqxhFx8b1PigZ/z4rJhwrFV9h87\nuAS723pEpB0ymP1pwaA6b/m0y86lKdHmVb/2p2WvUbCbfHIRJZA7PFSVMpv6\nJw69k23J/lwagO67OuG06+FuTnYZFRJhqkvj1DjmQxzx4djiKyALVX4nAf3g\nlY9MSLkQ14B05kZGt8OWeHOSrFahN7Q9tDPl4zt1r4aAtOlrOzQe95tftbjv\njfUz\r\n=pEAD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTM8hqQKX7aJCeO4v0SLjIgAC7gJna3NIWeJ0wCh1WwAiAzHKOWq/g91b1MC74Rs+MEanbelONIVQ30jIoF9uf30w=="}],"size":10353,"noattachment":false,"key":"/esbuild-runner/-/esbuild-runner-1.1.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_1.1.1_1607350405740_0.11455800173920339"},"_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":1607350405947,"_cnpm_publish_time":1607350405947,"dist-tags":{"latest":"2.2.2"}}