{"id":18742842,"url":"https://github.com/jsverse/letify","last_synced_at":"2025-04-12T21:22:46.339Z","repository":{"id":260090527,"uuid":"863637598","full_name":"jsverse/letify","owner":"jsverse","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-29T10:35:50.000Z","size":399,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-07T14:22:11.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jsverse.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}},"created_at":"2024-09-26T16:32:46.000Z","updated_at":"2025-02-27T19:51:11.000Z","dependencies_parsed_at":"2024-10-29T13:54:00.625Z","dependency_job_id":null,"html_url":"https://github.com/jsverse/letify","commit_stats":null,"previous_names":["jsverse/letify"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsverse%2Fletify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsverse%2Fletify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsverse%2Fletify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsverse%2Fletify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsverse","download_url":"https://codeload.github.com/jsverse/letify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493291,"owners_count":21113226,"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-07T16:09:22.986Z","updated_at":"2025-04-12T21:22:46.280Z","avatar_url":"https://github.com/jsverse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"300px\" src=\"./logo-gradient.svg\" alt=\"Letify Logo\"\u003e\n\u003c/div\u003e\n\n\u003ch3 align=\"center\"\u003eIt sounds like a spell and works like a charm ✨\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@jsverse/letify\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@jsverse/letify.svg?style=flat-square\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/jsverse/letify/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/jsverse/letify/workflows/CI/badge.svg\" alt=\"build status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@jsverse/letify\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/@jsverse/letify.svg?style=flat-square\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/jsverse/letify/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/jsverse/letify.svg?style=flat-square\" alt=\"license\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n--------------------\n\nLetify CLI helps Angular developers optimize their templates by scanning your files and detecting multiple async subscriptions to the same stream.\n\n### Usage\nTo get started, install Letify CLI:\n\n```bash\nnpm i -D @jsverse/letify\n```\n\nThen, run the command:\n```bash\nnpx letify [analyze|fix] 'a/b.html' 'c/**/*.html' ...\n```\n\n* `analyze`: Identifies duplicate subscriptions in the specified files and generates a report.\n* `fix`: Identifies duplicate subscriptions and replace duplications with a single `@let` declaration at the beginning of the template.\n\n#### CI / Lint-\nLetify will return an error exit code if any duplicate subscriptions are detected in the specified files.\nIt can be seamlessly integrated into your [lint-staged](https://github.com/lint-staged/lint-staged) or CI workflows to\nprevent duplicate subscriptions from being committed.\n\n#### Usage notes\n* Letify ignores commented code and does not analyze it.\n* Keyed reads (`data[prop] | async`) and function calls with arguments (`myMethod(value, ...) | async`) are currently not supported.\n* You'll need Angular `\u003e=18.1` to use the `@let` syntax, if you are using an older version, run the `analyze` command and\nuse alternatives to reuse your subscriptions.\n\n### Options\n\n* `-r, --reporter \u003ctype\u003e`: Specifies the report format:\n  * `html` (default): Generates an HTML report.\n  * `list`: Outputs a simple list of suggestions.\n  * `json`: Provides a JSON report for programmatic use.\n* `-o, --open`: Automatically opens the HTML report once generated (default `true`.\n* `--verify-convention` (default: `false`): Checks that stream names (observables) in the templates follow the convention of ending with a `$` sign.\n* `--variable-suffix` (default: `value`): Adds a suffix to the declared variable in `fix` mode, mainly to avoid collisions.\n\n### Debugging\n\nYou can extend the default logs by setting the `DEBUG` environment variable:\n```bash\nDEBUG=letify:* npx letify ...\n```\nSupported namespaces: `letify:*|letify:fix`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsverse%2Fletify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsverse%2Fletify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsverse%2Fletify/lists"}