{"id":22422124,"url":"https://github.com/abumq/ejs-preview","last_synced_at":"2025-03-27T05:22:58.973Z","repository":{"id":36937812,"uuid":"231708114","full_name":"abumq/ejs-preview","owner":"abumq","description":"Preview EJS template by providing JSON data","archived":false,"fork":false,"pushed_at":"2022-12-11T19:16:21.000Z","size":41,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T10:27:42.504Z","etag":null,"topics":["ejs-express","ejs-templates","node-development"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abumq.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":"2020-01-04T04:26:05.000Z","updated_at":"2023-06-03T07:24:36.000Z","dependencies_parsed_at":"2023-01-17T07:20:53.217Z","dependency_job_id":null,"html_url":"https://github.com/abumq/ejs-preview","commit_stats":null,"previous_names":["abumq/ejs-preview","amrayn/ejs-preview"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fejs-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fejs-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fejs-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fejs-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abumq","download_url":"https://codeload.github.com/abumq/ejs-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245786767,"owners_count":20671803,"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":["ejs-express","ejs-templates","node-development"],"created_at":"2024-12-05T17:11:47.390Z","updated_at":"2025-03-27T05:22:58.954Z","avatar_url":"https://github.com/abumq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EJS Preview\nPreview EJS template by providing JSON data\n\n\u003cp align=\"center\"\u003e\n    •   •   •\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/ejs-preview\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/npm/v/ejs-preview.svg?style=for-the-badge\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://github.com/amrayn/ejs-preview/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/npm/l/ejs-preview?style=for-the-badge\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"Donate via PayPal\" href=\"https://amrayn.com/donate\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/static/v1?label=Donate\u0026message=PayPal\u0026color=purple\u0026style=for-the-badge\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    •   •   •\n\u003c/p\u003e\n\n## Installation\n\n```bash\nnpm i ejs-preview -S\n```\n\n```bash\nyarn add ejs-preview\n```\n\n```\nejs-preview --root=/path/to/root/files --common=/json/file.json\n```\n\n* `root`: Path to the root files. e.g, `/app/src/templates`\n* `common`: Path to JSON file. Common data for all the templates. e.g, `/app/src/templates/preview-common.json`\n\nOnce server is running you can pass following query parameters\n\n* `template`: EJS file base to render (relative to root) e.g, `?template=emails/welcome` will render `\u003croot\u003e/emails/welcome.ejs`.\n\n  The template specific data is picked up from `\u003croot\u003e/emails/welcome.preview.js` which should look like:\n\n```\nmodule.exports = {\n  activationLink: '/link',\n};\n```\n* `common` If you want to override `common` args provided at the startup\n* `plain` If specified `plain/text` content-type is sent\n\nYou can change the port with `PORT` environment variable\n\n\n# License\n```\nCopyright (c) 2020 Amrayn Web Services\nCopyright (c) 2020 @abumusamq\n\nhttps://github.com/amrayn/\nhttps://amrayn.com\nhttps://humble.js.org\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabumq%2Fejs-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabumq%2Fejs-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabumq%2Fejs-preview/lists"}