{"id":13847427,"url":"https://github.com/mgechev/ngast","last_synced_at":"2025-07-10T02:35:25.881Z","repository":{"id":44710859,"uuid":"80573731","full_name":"mgechev/ngast","owner":"mgechev","description":"Parser for Angular projects.","archived":false,"fork":false,"pushed_at":"2023-01-06T18:16:52.000Z","size":3389,"stargazers_count":171,"open_issues_count":9,"forks_count":29,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-05T12:04:44.031Z","etag":null,"topics":["angular","ast","codelyzer","static-analysis","typescript"],"latest_commit_sha":null,"homepage":"https://mgechev.github.io/ngast/","language":"TypeScript","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/mgechev.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-31T23:41:12.000Z","updated_at":"2025-04-30T11:27:12.000Z","dependencies_parsed_at":"2023-02-06T07:46:04.852Z","dependency_job_id":null,"html_url":"https://github.com/mgechev/ngast","commit_stats":null,"previous_names":["ng-ast/ngast"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fngast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fngast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fngast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fngast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgechev","download_url":"https://codeload.github.com/mgechev/ngast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252859947,"owners_count":21815435,"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":["angular","ast","codelyzer","static-analysis","typescript"],"created_at":"2024-08-04T18:01:20.049Z","updated_at":"2025-05-08T21:44:01.206Z","avatar_url":"https://github.com/mgechev.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/mgechev/ngast.svg?branch=master)](https://travis-ci.org/mgechev/ngast)\n\n# ngast\n\nThis library provides user friendly API for parsing Angular projects.\n\n# Getting started\n```\n$ npm i @angular/core @angular/compiler @angular/compiler-cli ngast --save\n```\n\n\u003e `ngast` is built on top of Ivy (`ngtsc`), make sure to compile your project with `ngcc` (run `ng serve`, `ng build` or `npx ngcc`).\n\n## Workspace\nFirst you need connect the `WorkspaceSymbols` to the `tsconfig.json` root : \n```typescript\nimport { join } from 'path';\nimport { WorkspaceSymbols } from 'ngast';\n\nconst config = join(process.cwd(), 'tsconfig.json');\nconst workspace = new WorkspaceSymbols(config);\n```\n\nFrom there you can find all the decorated classes in your project : \n```typescript\nconst modules = workspace.getAllModules();\nconst components = workspace.getAllComponents();\nconst directives = workspace.getAllDirectives();\nconst injectables = workspace.getAllInjectable();\nconst pipes = workspace.getAllPipes();\n```\n\nThe **first time** one of the method above is called, `ngast` will run the analysis of the workspace.\n\nThe analysis is currently quite long: **\u003e10sec for a small project** can go **beyond 2min for a very large project**.\n\n\n# Working without Ivy\nVersion 0.4.0 is built on top of the ViewEngine, you can take a look at the [documentation here](https://ng-ast.github.io/ngast/).\n\n# Example\n\nProjects using ngast:\n\n- [ngrev](https://github.com/mgechev/ngrev) - Tool for reverse engineering of Angular applications.\n- [codelyzer](https://github.com/mgechev/codelyzer) - Static code analysis for Angular projects.\n- [ngworld](https://github.com/mgechev/ngworld) - Visualization of Angular projects.\n- [ng-app-counter](https://github.com/irustm/ng-app-counter) - Counter for Angular applications.\n- [ng-pathfinder](https://github.com/vakrilov/ng-pathfinder) - Show a list of all routes in an angular application.\n- [ngx-translate-all](https://github.com/irustm/ngx-translate-all) - Tool for automate i18n Angular projects.\n- [ngx-translate-migrate](https://github.com/irustm/ngx-translate-migrate) - Tool for migrate from ngx-translate to Angular i18n.\n\n# License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgechev%2Fngast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgechev%2Fngast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgechev%2Fngast/lists"}