{"id":23785805,"url":"https://github.com/foxfirecodes/project-templater","last_synced_at":"2026-04-13T06:30:18.253Z","repository":{"id":65475742,"uuid":"79595719","full_name":"foxfirecodes/project-templater","owner":"foxfirecodes","description":"A Node module for templating projects","archived":false,"fork":false,"pushed_at":"2017-01-20T20:51:14.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T05:06:28.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/project-templater","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxfirecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-20T20:31:24.000Z","updated_at":"2017-02-14T03:09:15.000Z","dependencies_parsed_at":"2023-01-25T06:05:11.003Z","dependency_job_id":null,"html_url":"https://github.com/foxfirecodes/project-templater","commit_stats":null,"previous_names":["foxfirecodes/project-templater","rayzr522/project-templater"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxfirecodes%2Fproject-templater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxfirecodes%2Fproject-templater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxfirecodes%2Fproject-templater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxfirecodes%2Fproject-templater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxfirecodes","download_url":"https://codeload.github.com/foxfirecodes/project-templater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240002103,"owners_count":19732164,"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":"2025-01-01T14:07:08.768Z","updated_at":"2026-04-13T06:30:18.212Z","avatar_url":"https://github.com/foxfirecodes.png","language":"JavaScript","readme":"# project-templater\nThis is a simple Node module for creating a new project from a template directory, and supports replacing placeholders in files with custom values.\n\n## Installation\n`yarn add project-templater`\n\n## Usage\nTo use `project-templater`, it's as simple as the following code:\n\n    // Load module\n    var templater = require('templater');\n\n    // Copy from the template folder to a new folder\n    templater.copy('../template-project', './new-project', {\n        // This is the context object. Placeholders in the format\n        // of `$((key))` will be replaced with the appropriate\n        // value from this object.\n        name: 'MyProject',\n        someKey: 'a value'\n    }, (file) =\u003e file.endsWith('.js'));\n\n## Documentation\n\n### `copy(template, destination, context, filter?)`\n- `template: string`  \n    The path to the template project directory.\n- `destination: string`  \n    The path of the destination project directory. If this folder does not exist, it will be created.\n- `context: Object`  \n    The context object to be used for key-value replacement.\n- `filter?: (filename: string) =\u003e boolean`  \n    An optional filter to control which files are copied over from the template. If this filter-callback returns `false` on a file, that file will not be copied. All file names passed to this callback are relative to the template folder.\n\n## Templating examples\n\n#### `\u003ctemplate\u003e/myFile.txt`:\n\n    This is my file about $((projectName)). Description: $((description)).\n\n#### `context` object:\n\n    {\n        projectName: 'My Project',\n        description: 'A fancy templated project'\n    }\n\n#### `\u003cdestination\u003e/myFile.txt`:\n\n    This is my file about My Project. Description: A fancy templated project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxfirecodes%2Fproject-templater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxfirecodes%2Fproject-templater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxfirecodes%2Fproject-templater/lists"}