ngast is a library providing a user-friendly API for parsing Angular projects by abstracting over the Angular compiler. The current stable version is 0.6.2, built on top of Ivy (ngtsc) and requiring TypeScript ~4.0.0. Key differentiators: it offers a high-level interface to analyze Angular workspaces, methods like getAllComponents() and getAllModules(), and integrates with tools like ngrev and codelyzer. The analysis is slow (>10 sec for small projects). Release cadence is low; previous version 0.4.0 used the older ViewEngine.
npm install ngastNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize WorkspaceSymbols with a tsconfig path and retrieve all Angular decorated classes (modules, components, directives, injectables, pipes) from the workspace.
Upgrade your Angular project to use Ivy and run ngcc before using ngast 0.5+.
Be patient; consider using a progress indicator. Avoid calling getAll* multiple times unnecessarily.
Ensure your project uses TypeScript 4.0.x and tslib 2.x.
Update to ngast 0.6.2 and upgrade Angular to version 9+ with Ivy enabled.
npm install @angular/compiler --save
Use 'import { WorkspaceSymbols } from 'ngast' instead of require.Use workspace.getAllComponents().