{"id":30302394,"url":"https://github.com/knowledgecode/ejs-cli-extended","last_synced_at":"2025-08-17T05:09:07.690Z","repository":{"id":309737378,"uuid":"1037069123","full_name":"knowledgecode/ejs-cli-extended","owner":"knowledgecode","description":"Extended EJS CLI tool with directory processing and watch functionality","archived":false,"fork":false,"pushed_at":"2025-08-13T07:39:16.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T15:40:17.523Z","etag":null,"topics":["build","cli","compiler","ejs","template","watch"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/knowledgecode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-13T02:50:39.000Z","updated_at":"2025-08-13T07:58:11.000Z","dependencies_parsed_at":"2025-08-13T15:40:19.810Z","dependency_job_id":"273364c4-3d4a-49ed-b328-6c976f7fc49c","html_url":"https://github.com/knowledgecode/ejs-cli-extended","commit_stats":null,"previous_names":["knowledgecode/ejs-cli-extended"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/knowledgecode/ejs-cli-extended","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knowledgecode%2Fejs-cli-extended","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knowledgecode%2Fejs-cli-extended/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knowledgecode%2Fejs-cli-extended/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knowledgecode%2Fejs-cli-extended/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knowledgecode","download_url":"https://codeload.github.com/knowledgecode/ejs-cli-extended/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knowledgecode%2Fejs-cli-extended/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270807934,"owners_count":24649346,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["build","cli","compiler","ejs","template","watch"],"created_at":"2025-08-17T05:09:07.072Z","updated_at":"2025-08-17T05:09:07.675Z","avatar_url":"https://github.com/knowledgecode.png","language":"TypeScript","readme":"# EJS CLI Extended\n\nExtended EJS CLI tool with directory processing and watch functionality.\n\n[![CI](https://github.com/knowledgecode/ejs-cli-extended/actions/workflows/ci.yml/badge.svg)](https://github.com/knowledgecode/ejs-cli-extended/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/ejs-cli-extended)](https://www.npmjs.com/package/ejs-cli-extended)\n\n## Features\n\n- 🗂️ **Directory Processing**: Process all `.ejs` files in a directory recursively\n- 👀 **Watch Mode**: Automatically recompile templates when files change\n- ⚡ **Concurrent Processing**: Multiple templates can be processed simultaneously\n- 🔄 **100% Compatible**: Directly executes the official EJS CLI, ensuring perfect compatibility\n\n## Installation\n\n### Global Installation\n\n```bash\nnpm install -g ejs-cli-extended\n```\n\n### Local Installation\n\n```bash\nnpm install ejs-cli-extended\n```\n\nWhen installed locally, you can run it with:\n\n```bash\n# Using npx\nnpx ejsc src:dist\n\n# Using npm scripts\nnpm exec ejsc src:dist\n\n# Or add to your package.json scripts\n\"scripts\": {\n  \"build\": \"ejsc src:dist\"\n}\n```\n\n## Usage\n\n### Single File Mode\n\nProcess a single EJS template file:\n\n```bash\nejsc template.ejs -o output.html\nejsc template.ejs -f data.json -o output.html\n```\n\n### Directory Mode\n\nProcess all `.ejs` files in a directory:\n\n```bash\nejsc src:dist\nejsc templates:build -f config.json\n```\n\n### Watch Mode\n\nContinuously watch for changes and recompile:\n\n```bash\n# Single file\nejsc template.ejs -o output.html --watch\n\n# Directory\nejsc src:dist --watch\n```\n\n## Options\n\n### Standard EJS CLI Options\n\nAll standard EJS CLI options are supported. For complete documentation, see the [official EJS CLI repository](https://github.com/mde/ejs?tab=readme-ov-file#cli).\n\n### Extended Options\n\n- `--watch` - Watch for changes and recompile automatically\n- `input-dir:output-dir` - Process directory (replaces single file path)\n\n## Examples\n\n### Basic Directory Processing\n\n```bash\n# Process all .ejs files in 'templates' directory\n# Output to 'dist' directory\nejsc templates:dist\n```\n\n### With Data File\n\n```bash\n# Use JSON data file for template variables\nejsc src:build -f data.json\n```\n\n### Watch Mode\n\n```bash\n# Watch for changes and auto-recompile\nejsc templates:dist --watch -f config.json\n```\n\n## Directory Structure\n\nWhen using directory mode, the tool:\n\n1. Recursively finds all `.ejs` files in the input directory\n2. Maintains the same directory structure in the output\n3. Converts `.ejs` extensions to `.html`\n4. Creates output directories as needed\n\nExample:\n\n```text\nsrc/\n├── index.ejs           → dist/index.html\n├── pages/\n│   ├── about.ejs       → dist/pages/about.html\n│   └── contact.ejs     → dist/pages/contact.html\n└── components/\n    └── header.ejs      → dist/components/header.html\n```\n\n## Complete EJS CLI Compatibility\n\nThis tool directly executes the official EJS CLI, ensuring 100% compatibility. All EJS CLI features are supported, including:\n\n- All command-line options and flags\n- Data input via files, command line, or stdin pipe\n- Template preprocessing and compilation\n- Custom delimiters and configurations\n\n```bash\n# All these work exactly like the official EJS CLI\nejsc template.ejs -o output.html\nejsc template.ejs -f data.json -o output.html\necho '{\"name\": \"World\"}' | ejsc template.ejs -o output.html\nejsc template.ejs -m $ -p [ -c ] -o output.html\n```\n\nYou can use this tool as a complete drop-in replacement for the official EJS CLI.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknowledgecode%2Fejs-cli-extended","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknowledgecode%2Fejs-cli-extended","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknowledgecode%2Fejs-cli-extended/lists"}