{"id":14156215,"url":"https://github.com/rdarida/lerna-templater","last_synced_at":"2026-03-10T23:35:23.472Z","repository":{"id":36958042,"uuid":"421865817","full_name":"rdarida/lerna-templater","owner":"rdarida","description":"Generates package from template for a Lerna Monorepo Project","archived":false,"fork":false,"pushed_at":"2026-03-10T08:15:33.000Z","size":1503,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-10T15:52:45.593Z","etag":null,"topics":["generator","lerna","package","template"],"latest_commit_sha":null,"homepage":"https://rdarida.github.io/lerna-templater/","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/rdarida.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"rdarida"}},"created_at":"2021-10-27T15:08:16.000Z","updated_at":"2026-03-10T08:15:36.000Z","dependencies_parsed_at":"2025-04-23T19:16:38.496Z","dependency_job_id":"749fadd1-e723-426e-bc3a-9509d4ae0971","html_url":"https://github.com/rdarida/lerna-templater","commit_stats":{"total_commits":67,"total_committers":2,"mean_commits":33.5,"dds":0.4328358208955224,"last_synced_commit":"818beb92c92c7d0fedc685fc718eb9c3441e0592"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/rdarida/lerna-templater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdarida%2Flerna-templater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdarida%2Flerna-templater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdarida%2Flerna-templater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdarida%2Flerna-templater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdarida","download_url":"https://codeload.github.com/rdarida/lerna-templater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdarida%2Flerna-templater/sbom","scorecard":{"id":764849,"data":{"date":"2025-08-11","repo":{"name":"github.com/rdarida/lerna-templater","commit":"e38d8ce0b12c0faa31825a20d9791a900de254d3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-pages-deploy.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/github-pages-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-pages-deploy.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/github-pages-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-pages-deploy.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/github-pages-deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/github-pages-deploy.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/github-pages-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-pages-deploy.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/github-pages-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-pages-deploy.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/github-pages-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rdarida/lerna-templater/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:25","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   2 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/dependabot-auto-merge.yml:14","Warn: topLevel 'contents' permission set to 'write': .github/workflows/github-pages-deploy.yml:10","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:13"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T00:28:33.392Z","repository_id":36958042,"created_at":"2025-08-23T00:28:33.393Z","updated_at":"2025-08-23T00:28:33.393Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30362121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["generator","lerna","package","template"],"created_at":"2024-08-17T08:05:17.751Z","updated_at":"2026-03-10T23:35:23.454Z","avatar_url":"https://github.com/rdarida.png","language":"TypeScript","funding_links":["https://patreon.com/rdarida"],"categories":["others"],"sub_categories":[],"readme":"\u003cimg src=\"https://repository-images.githubusercontent.com/421865817/93b5b25d-bf76-4a47-b04e-be734716c56d\" alt=\"Cover\" /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.com/package/lerna-templater/\" target=\"_blank\" alt=\"NPM\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/lerna-templater.svg\" alt=\"NPM Badge\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/rdarida/lerna-templater\" target=\"_blank\" alt=\"GitHub Repository\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-repository-222222?style=flat\u0026logo=github\" alt=\"GitHub Repository Badge\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/rdarida/lerna-templater/actions/workflows/publish.yml\" target=\"_blank\" alt=\"GitHub Actions\"\u003e\n    \u003cimg src=\"https://github.com/rdarida/lerna-templater/actions/workflows/publish.yml/badge.svg\" alt=\"Publish Badge\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://sonarcloud.io/dashboard?id=rdarida_lerna-templater\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=rdarida_lerna-templater\u0026metric=coverage\" alt=\"Coverage Badge\" /\u003e\n  \u003c/a\u003e\n\n  \u003cimg src=\"https://img.shields.io/librariesio/release/npm/lerna-templater\" alt=\"Dependencies Badge\" /\u003e\n\u003c/p\u003e\n\u003chr\u003e\n\n# lerna-templater\nGenerates package from template for a Lerna Monorepo Project\n\n## Installation\nInstall **`lerna-templater`** via **[npm](https://npmjs.org/package/lerna-templater)**:\n\n```sh\nnpm i -D lerna-templater\n```\n\n## Usage\n### Importing in a script\n```ts\nimport { TemplaterOptions, templater } from 'lerna-templater';\n\n/**\n * @param {string} cwd - The current working directory.\n * @param {TemplaterOptions} options - Configuration options for the templater.\n */\ntemplater(cwd, options);\n```\n\n### Using as a CLI tool\n```sh\nnpx lerna-templater -n \"example-newpackage\" -d \"Description for the new example package\"\n```\n\nAlternatively, add it to your `package.json` scripts:\n```json\n\"scripts\": {\n  \"create\": \"lerna-templater\"\n}\n```\n\nThen run:\n```sh\nnpm run create -- -n \"example-newpackage\" -d \"Description for the new example package\"\n```\n\n## API\n### `templater(cwd, options)`\nGenerates a new package using a template. The package is created in the directory **`cwd`/`options.packages`/`options.name`**, using the template from **`cwd`/`options.template`**.\n\n### `TemplaterOptions`\n- **`name`** (**string**, **required**) - The name of the new package.\n- **`description`** (**string**, optional) - A description for the package.\n- **`scope`** (**string**, optional) - The package scope. Defaults to the scope in the main `package.json`.\n- **`packages`** (**string**, optional) - The relative path to the packages directory. Defaults to the first entry in `lerna.json`'s `packages` array.\n- **`template`** (**string**, optional) - The relative path to the template directory. Defaults to `__template__`.\n\n## Templating with Mustache\n**lerna-templater** uses [Mustache.js](https://npmjs.org/package/mustache) for templating. Files with the `.mustache` extension in the template directory are rendered and saved without the extension. For example, `package.json.mustache` becomes `package.json`.\n\n### Available template variables\n- `{{{name}}}` - The package name.\n- `{{{description}}}` - The package description.\n- `{{{scope}}}` - The package scope.\n- `{{{packages}}}` - The relative path to the packages directory.\n- `{{{template}}}` - The relative path to the template directory.\n- `{{{version}}}` - The package version.\n- `{{{repoDir}}}` - The package's relative path in the repository.\n\n## Example\n### Directory structure\n```\n.\n├── __template__/\n│   ├── package.json.mustache\n│   └── README.md.mustache\n├── packages/\n├── lerna.json\n└── package.json\n```\n\n### Template files\n#### `__template__/package.json.mustache`\n```json\n{\n  \"name\": \"{{{scope}}}{{{name}}}\",\n  \"description\": \"{{{description}}}\",\n  \"version\": \"{{{version}}}\",\n  \"repository\": {\n    \"directory\": \"{{{repoDir}}}\"\n  }\n}\n```\n\n#### `__template__/README.md.mustache`\n```md\n# {{{name}}}\n\n{{{description}}}\n```\n\n#### `lerna.json`\n```json\n{\n  \"packages\": [\n    \"packages/*\"\n  ],\n  \"version\": \"0.0.0\"\n}\n```\n\n#### `package.json`\n```json\n{\n  \"name\": \"@examplescope/example-newpackage\"\n}\n```\n\n### Output\nRunning:\n```sh\nnpx lerna-templater -n \"example-newpackage\" -d \"Description for the new example package\" -s \"@examplescope\"\n```\nGenerates:\n- `packages/example-newpackage/`\n- `package.json` and `README.md` inside `packages/example-newpackage`\n\n#### `package.json`\n```json\n{\n  \"name\": \"@examplescope/example-newpackage\",\n  \"description\": \"Description for the new example package\",\n  \"version\": \"0.0.0\",\n  \"repository\": {\n    \"directory\": \"packages/example-newpackage\"\n  }\n}\n```\n\n#### `README.md`\n```md\n# example-newpackage\n\nDescription for the new example package\n```\n\n\u003chr\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cstrong\u003eResources\u003c/strong\u003e\n  \u003c/summary\u003e\n\n- [Documentation](https://rdarida.github.io/lerna-templater/)\n\u003c/details\u003e\n\u003chr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\" target=\"_blank\" alt=\"License\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-green\" alt=\"License Badge\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdarida%2Flerna-templater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdarida%2Flerna-templater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdarida%2Flerna-templater/lists"}