{"name":"eta","version":"1.13.0","keywords":["handlebars","ejs","eta","template engine","embedded template engine","layouts","partials","typescript types"],"author":{"name":"Ben Gubler","email":"nebrelbug@gmail.com"},"license":"MIT","_id":"eta@1.13.0","maintainers":[{"name":"nebrelbug","email":"nebrelbug@gmail.com"},{"name":"shadowtime2000","email":"shadowtime2000@gmail.com"}],"homepage":"https://eta.js.org","bugs":{"url":"https://github.com/eta-dev/eta/issues"},"dist":{"shasum":"fff245d667ee663f614cb73eed8bf20917fe5843","tarball":"http://registry-npm.ywwl.com/eta/download/eta-1.13.0.tgz","fileCount":47,"integrity":"sha512-GTgHqxvbQbNoUfkbdgHMVTY3bXVRJUWkfWEImZ2TPjln6nFlsYvu2fIVGWQmsa3qQ1ck0HwGq8OhS0wPCnsjMw==","signatures":[{"sig":"MEQCIE9dwyMsgOCtKRdS3xi6iC64Iy2bjdjuketq/8E+/Ub/AiB22zdkAYWJcIai7bH0+zjhFcU0T5uHhkYi1248/0EfWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":498242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvzD4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9wA/+NKwOV2SGv9E8hnDFu/uTK+iuGzwP9zGzzP6cKYNzGpijslvT\r\n4bF0tsFLukCn9WbzJcgct28N7j5hfZb8bMgi4ZMcTNaCVlSnMxmqzqEg6SG1\r\ndgqf8FrXPRrr6exSmtzcNPo5b+CCqOM5447DlYtGjqof9tjSR43lM5SNHe+t\r\nTFHolVpgzvEi16duUk6S8mema1kNOsRi+XKmvPKVnKIEc6XShmAGQ7cbXJrN\r\nSyLKdcR7Mk5xJ6Sqe7Twdhgft/LnB6t+T/YUF6wTpizEQjzqcvqRXVhlKWn3\r\nO+KRQ7MmPBOK41SBddoWfdSUC+smb5p1VWC2cnj49TQEGV5j2qMA0OCq1iKO\r\nK0vOE6UasnWgtJMaPT3ogX3Q18I5XtHRWlJxpQLkyli88woE1FiG9qV2Ru5e\r\nlMamW/yZYAq35fNIVOZqB4W+Rd+oHb2OJ58NHjUWxb35KEPNSSullnisz+qV\r\nu/hnJ4VLrV1zjkVUPTUb0mOKcNUB8Z94ZxNpDKF9ocatQmal+KzzHI27h2lu\r\n1g7MzHI5kFo+pNLWIZcLo4s9ehOZWPNsXeFBamA1gsHwACBnQaP9djE8TcAl\r\nfEk1yChCCdMJrEPYI9swQbjIAzDirQi8vocE9dSZyWZiCFEqHS9i2z+7BG98\r\nC+5/Cmz+LGp1pqDqHPGtca5SmnxYE+ii4O8=\r\n=CA6W\r\n-----END PGP SIGNATURE-----\r\n","size":114916,"noattachment":false,"key":"/eta/-/eta-1.13.0.tgz"},"jest":{"testRegex":"\\/test\\/(?!deno\\/).*(\\.spec\\.ts)$","transform":{".(ts)":"ts-jest"},"testEnvironment":"node","coverageThreshold":{"global":{"lines":95,"branches":85,"functions":95,"statements":95}},"collectCoverageFrom":["src/!(*.deno|browser).ts"],"moduleFileExtensions":["ts","js"],"testPathIgnorePatterns":["/src/*.deno.ts"],"coveragePathIgnorePatterns":["/node_modules/","/test/","/test/deno/","/src/*.deno.ts"]},"main":"dist/eta.cjs","type":"module","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/types/index.d.ts","unpkg":"dist/browser/eta.min.js","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"module":"dist/eta.es.js","browser":"dist/browser/eta.min.js","engines":{"node":">=6.0.0"},"exports":{"types":"./dist/types/index.d.ts","import":"./dist/eta.es.js","browser":"./dist/browser/eta.min.js","require":"./dist/eta.cjs"},"funding":"https://github.com/eta-dev/eta?sponsor=1","gitHead":"72f6c5bffa470bb6d6cc3f55dc44f7249ba5624f","scripts":{"lint":"eslint src/*.ts test/*.spec.ts examples/* --ext .js,.ts","size":"size-limit","test":"jest --coverage && npm run test:deno && npm run size","build":"denoify && rollup -c rollup.config.ts && rimraf docs && typedoc --tsconfig tsconfig.json src && deno fmt deno_dist/*.ts","start":"rollup -c rollup.config.ts -w","commit":"git-cz","format":"prettier --write '{src,test}/**/!(*.deno).ts' && deno fmt deno_dist/*.ts","release":"npm run build && np","prebuild":"rimraf dist && rimraf deno_dist","test:deno":"deno test test/deno/*.spec.ts --allow-read --unstable","test:prod":"npm run lint && npm run test -- --no-cache","test:watch":"jest --coverage --watch","deploy-docs":"ts-node tools/gh-pages-publish","report-coverage":"cat ./coverage/lcov.info | coveralls","travis-deploy-once":"travis-deploy-once --pro"},"typings":"dist/types/index.d.ts","_npmUser":{"name":"nebrelbug","email":"nebrelbug@gmail.com"},"jsdelivr":"dist/browser/eta.min.js","standard":{"ignore":["dist","deno_dist","src/*.deno.ts"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/eta-dev/eta.git","type":"git"},"size-limit":[{"path":"dist/browser/eta.min.js","limit":"3 KB"}],"_npmVersion":"8.19.3","description":"Lightweight, fast, and powerful embedded JS template engine","directories":{},"lint-staged":{"{src,test}/**/!(*.deno).ts":["eslint"]},"sideEffects":false,"_nodeVersion":"19.2.0","_hasShrinkwrap":false,"devDependencies":{"np":"^6.5.0","jest":"^29.3.1","husky":"^4.3.0","tslib":"^2.2.0","eslint":"^8.29.0","rimraf":"^3.0.2","rollup":"^2.26.11","denoify":"^0.6.3","shelljs":"^0.8.4","ts-jest":"^29.0.3","ts-node":"^10.9.1","typedoc":"^0.23.22","prettier":"2.1.1","coveralls":"^3.1.0","cross-env":"^7.0.2","commitizen":"^4.2.1","size-limit":"^8.1.0","typescript":"^4.9.4","@types/jest":"^26.0.13","@types/node":"^14.11.1","lint-staged":"^10.3.0","@commitlint/cli":"^9.1.2","eslint-plugin-node":"11","travis-deploy-once":"^5.0.11","eslint-plugin-import":"2","rollup-plugin-terser":"^7.0.2","eslint-config-eta-dev":"^1.0.0","eslint-plugin-promise":"4","eslint-config-prettier":"^8.5.0","eslint-plugin-standard":"4","rollup-plugin-prettier":"^2.1.0","@rollup/plugin-commonjs":"^15.1.0","@typescript-eslint/parser":"^5.46.1","cz-conventional-changelog":"^3.3.0","rollup-plugin-typescript2":"^0.27.2","@rollup/plugin-node-resolve":"^9.0.0","@size-limit/preset-small-lib":"^8.1.0","@commitlint/config-conventional":"^17.3.0","@typescript-eslint/eslint-plugin":"5"},"_npmOperationalInternal":{"tmp":"tmp/eta_1.13.0_1673474296308_0.8411835253603579","host":"s3://npm-registry-packages"},"readme":"<p align=\"center\">\n  <img align=\"center\" width=\"50%\" src=\"https://github.com/bgub/eta/assets/25597854/041dbe34-883b-459b-8607-c787815c441a\">\n</p>\n\n<h1 align=\"center\" style=\"text-align: center; width: fit-content; margin-left: auto; margin-right: auto;\">eta (η)</h1>\n\n<p align=\"center\">\n  <a href=\"https://eta.js.org\">Documentation</a> -\n  <a href=\"https://discord.gg/27gGncJYE2\">Chat</a> -\n  <a href=\"https://eta.js.org/playground\">Playground</a>\n</p>\n\n<span align=\"center\">\n\n[![GitHub package.json version (main)](https://img.shields.io/github/package-json/v/bgub/eta/main?label=current%20version)](https://www.npmjs.com/package/eta)\n[![GitHub Actions Status](https://github.com/bgub/eta/actions/workflows/ci.yml/badge.svg)](https://github.com/bgub/eta/actions)\n[![Codecov](https://codecov.io/github/bgub/eta/branch/main/graph/badge.svg)](https://codecov.io/github/bgub/eta)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg)](https://paypal.me/bengubler)\n\n</span>\n\n<span align=\"center\">\n\n**You're viewing the source for Eta v4**\n\n</span>\n\n## Summary\n\nEta is a lightweight and blazing fast embedded JS templating engine that works inside Node, Deno, and the browser. It's written in TypeScript and emphasizes great performance, configurability, and small bundle size.\n\n> 🎯 **Built with [ts-base](https://github.com/bgub/ts-base)** — A TypeScript library starter template featuring Biome, Vitest, tsdown, and automated releases. Check out ts-base for a modern TypeScript project setup!\n\n### 🌟 Features\n\n- 📦 0 dependencies\n- 💡 Only ~3.5 KB minzipped\n- ⚡️ Written in TypeScript\n- ✨ Deno support (+ Node and browser)\n- 🚀 Super Fast\n- 🔧 Configurable\n  - Plugins, custom delimiters, caching\n- 🔨 Powerful\n  - Precompilation, partials, async, blocks\n  - **Layout support**!\n- 🔥 Reliable\n  - Better quotes/comments support\n    - _ex._ `<%= someval + \"string %>\" %>` compiles correctly, while it fails with doT or EJS\n  - Great error reporting\n- ⚡️ Exports ES Modules\n- 📝 Easy template syntax\n\n## Get Started\n\n_For more thorough documentation, visit [https://eta.js.org](https://eta.js.org)_\n\nInstall Eta\n\n```bash\nnpm install eta\n```\n\nIn the root of your project, create `templates/simple.eta`\n\n```eta\nHi <%= it.name %>!\n```\n\nThen, in your JS file:\n\n```js\nimport { Eta } from \"eta\";\n// or use https://jsr.io/@bgub/eta\n\nconst eta = new Eta({ views: path.join(__dirname, \"templates\") });\n\n// Render a template\n\nconst res = eta.render(\"./simple\", { name: \"Ben\" });\nconsole.log(res); // Hi Ben!\n```\n\n## FAQs\n\n<details>\n  <summary>\n    <b>Where did Eta's name come from?</b>\n  </summary>\n\n\"Eta\" means tiny in Esperanto. Plus, it can be used as an acronym for all sorts of cool phrases: \"ECMAScript Template Awesomeness\", \"Embedded Templating Alternative\", etc....\n\nAdditionally, Eta is a letter of the Greek alphabet (it stands for all sorts of cool things in various mathematical fields, including efficiency) and is three letters long (perfect for a file extension).\n\n</details>\n\n<br />\n\n## Integrations\n\n<details>\n  <summary>\n    <b>Visual Studio Code</b>\n  </summary>\n\n[@shadowtime2000](https://github.com/shadowtime2000) created [eta-vscode](https://marketplace.visualstudio.com/items?itemName=shadowtime2000.eta-vscode).\n\n</details>\n\n<details>\n  <summary>\n    <b>ESLint</b>\n  </summary>\n\n[eslint-plugin-eta](https://github.com/eta-dev/eslint-plugin-eta) was created to provide an ESLint processor so you can lint your Eta templates.\n\n</details>\n\n<details>\n  <summary>\n    <b>Webpack</b>\n  </summary>\n\nCurrently there is no official Webpack integration but [@clshortfuse](https://github.com/clshortfuse) shared the loader he uses:\n\n```javascript\n{\n  loader: 'html-loader',\n  options: {\n    preprocessor(content, loaderContext) {\n      return eta.render(content, {}, { filename: loaderContext.resourcePath });\n    },\n  },\n}\n```\n\n</details>\n\n<details>\n  <summary>\n    <b>Node-RED</b>\n  </summary>\n\nTo operate with Eta templates in Node-RED: [@ralphwetzel/node-red-contrib-eta](https://flows.nodered.org/node/@ralphwetzel/node-red-contrib-eta)\n\n  <img width=\"150\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16342003/160198427-2a69ff10-e8bf-4873-9d99-2929a584ccc8.png\">\n\n</details>\n\n<details>\n  <summary>\n    <b>Koa</b>\n  </summary>\n\nTo render Eta templates in [Koa](https://koajs.com) web framework: [@cedx/koa-eta](https://github.com/cedx/koa-eta/wiki)\n\n</details>\n\n<details>\n  <summary>\n    <b>Vite</b>\n  </summary>\n\nTo use Eta templates in your Vite project: [@rinoshiyo/vite-plugin-eta](https://github.com/rinoshiyo/vite-plugin-eta)\n\n</details>\n\n<br />\n\n## Projects using `eta`\n\n- [Docusaurus v2](https://v2.docusaurus.io): open-source documentation framework that uses Eta to generate a SSR build\n- [swagger-typescript-api](https://github.com/acacode/swagger-typescript-api): Open source typescript api codegenerator from Swagger. Uses Eta as codegenerator by templates\n- [html-bundler-webpack-plugin](https://github.com/webdiscus/html-bundler-webpack-plugin): Webpack plugin make easily to bundle HTML pages from templates, source styles and scripts\n- [SmartDeno](https://github.com/guildenstern70/SmartDeno): SmartDeno is an easy to setup web template using Deno & Oak\n- [stc](https://github.com/long-woo/stc): OpenAPI (Swagger) and Apifox documentation converted to api. Use eta templates to generate code.\n- [Add yours!](https://github.com/bgub/eta/edit/master/README.md)\n\n## Contributors\n\nMade with ❤️ by [bgub](https://github.com/bgub) and [many wonderful contributors](https://github.com/bgub/eta/graphs/contributors). Contributions of any kind are welcome!\n\n## Credits\n\n- Async support, file handling, and error formatting were based on code from [EJS](https://github.com/mde/ejs), which is licensed under the Apache-2.0 license. Code was modified and refactored to some extent.\n- Syntax and some parts of compilation are heavily based off EJS, Nunjucks, and doT.\n","publish_time":1673474296591,"_cnpm_publish_time":1673474296591,"dist-tags":{"latest":"4.6.0","next":"4.0.0-beta.1"}}