{"id":20305070,"url":"https://github.com/mcmath/ejs-html-loader","last_synced_at":"2025-04-11T14:50:27.421Z","repository":{"id":57221135,"uuid":"51275818","full_name":"mcmath/ejs-html-loader","owner":"mcmath","description":"Webpack loader for rendering HTML from EJS templates","archived":false,"fork":false,"pushed_at":"2020-05-14T06:23:53.000Z","size":145,"stargazers_count":47,"open_issues_count":6,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T10:51:16.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","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/mcmath.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":"2016-02-08T02:18:34.000Z","updated_at":"2022-04-16T09:21:17.000Z","dependencies_parsed_at":"2022-08-29T04:01:49.678Z","dependency_job_id":null,"html_url":"https://github.com/mcmath/ejs-html-loader","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmath%2Fejs-html-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmath%2Fejs-html-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmath%2Fejs-html-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmath%2Fejs-html-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcmath","download_url":"https://codeload.github.com/mcmath/ejs-html-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248424117,"owners_count":21101119,"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-11-14T17:06:55.424Z","updated_at":"2025-04-11T14:50:27.388Z","avatar_url":"https://github.com/mcmath.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ejs-html-loader\n\n[![Version][version-badge]][npm]\n[![Build][build-badge]][travis]\n[![Coverage][coverage-badge]][coveralls]\n\n[Webpack][webpack] loader for rendering plain HTML from [EJS][ejs]\ntemplate files\n\n## Install\n\nInstall with [npm][npm]. Ensure [EJS][ejs] and [Webpack][webpack] are installed\nas well, as these are peer dependencies.\n\n```sh\nnpm install --save-dev webpack ejs ejs-html-loader\n```\n\n## Usage\n\nIn your Webpack [configuration][webpack-configuration], pass data to your\ntemplates through either an `'options'` object or as query parameters.\n\n```js\nmodule.exports = {\n  // ...\n  module: {\n    rules: [{\n      test: /\\.ejs$/,\n      loader: 'ejs-html-loader',\n      options: {\n        title: 'The Ant: An Introduction',\n        season: 1,\n        episode: 9,\n        production: process.env.ENV === 'production'\n      }\n    }]\n  }\n};\n```\n\nData may also be passed through a resource query. These data take precedence\nover any options with the same name.\n\n```js\nimport \"./index.ejs?page=home\";\n```\n\n## Options\n\nAll properties passed as loader options will be available to your\ntemplates as local variables. In addition, the following [EJS][ejs]\noptions may be set:\n\n* **context** : `object`\u003cbr\u003e\nThe value of `this` in your templates. If specified, its properties will be\navailable in your templates, e.g. `\u003c%= this.somePropery %\u003e`.\n\n* **delimiter** : `string='%'`\u003cbr\u003e\nCharacter used inside of angle brackets marking opening/closing tags.\nDefaults to `'%'`, as in `\u003c%= some.variable %\u003e`.\n\nFor example:\n\n```js\n{\n  // ...\n  options: {\n    delimiter: '$',\n    title: 'The Naked Ant',\n    season: 1,\n    episode: 12\n  }\n}\n```\n\n## Includes\n\nThe EJS `filename` option is set automatically, so you may include partials\nrelative to your template files. If you want your included files to\nautomatically recompile in watch mode, be sure to use the following syntax:\n\n```\n\u003c% include some/file %\u003e\n```\n\n## License\n\nCopyright \u0026copy; 2016\u0026ndash;2019 Akim McMath. Licensed under the [MIT License][license].\n\n[version-badge]: https://img.shields.io/npm/v/ejs-html-loader.svg?style=flat-square\n[build-badge]: https://img.shields.io/travis/mcmath/ejs-html-loader/master.svg?style=flat-square\n[coverage-badge]: https://img.shields.io/coveralls/mcmath/ejs-html-loader/master.svg?style=flat-square\u0026service=github\n[dependencies-badge]: https://img.shields.io/gemnasium/mcmath/ejs-html-loader.svg?style=flat-square\n\n[npm]: https://www.npmjs.com/package/ejs-html-loader\n[license]: LICENSE\n[travis]: https://travis-ci.org/mcmath/ejs-html-loader\n[coveralls]: https://coveralls.io/github/mcmath/ejs-html-loader?branch=master\n[gemnasium]: https://gemnasium.com/mcmath/ejs-html-loader\n[webpack]: https://webpack.js.org/\n[webpack-configuration]: https://webpack.js.org/configuration/\n[ejs]: http://ejs.co/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcmath%2Fejs-html-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcmath%2Fejs-html-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcmath%2Fejs-html-loader/lists"}