ngast
Parsing tools for Angular. The project is an abstraction over the Angular compiler which provides friendly interface.
Last updated 5 years ago by mgechev .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install ngast 
SYNC missed versions from official npm registry.

Build Status

ngast

This library provides user friendly API for parsing Angular projects.

Getting started

$ npm i @angular/core @angular/compiler @angular/compiler-cli ngast --save

ngast is built on top of Ivy (ngtsc), make sure to compile your project with ngcc (run ng serve, ng build or npx ngcc).

Workspace

First you need connect the WorkspaceSymbols to the tsconfig.json root :

import { join } from 'path';
import { WorkspaceSymbols } from 'ngast';

const config = join(process.cwd(), 'tsconfig.json');
const workspace = new WorkspaceSymbols(config);

From there you can find all the decorated classes in your project :

const modules = workspace.getAllModules();
const components = workspace.getAllComponents();
const directives = workspace.getAllDirectives();
const injectables = workspace.getAllInjectable();
const pipes = workspace.getAllPipes();

The first time one of the method above is called, ngast will run the analysis of the workspace.

The analysis is currently quite long: >10sec for a small project can go beyond 2min for a very large project.

Working without Ivy

Version 0.4.0 is built on top of the ViewEngine, you can take a look at the documentation here.

Example

Projects using ngast:

License

MIT

Current Tags

  • 0.6.2                                ...           latest (5 years ago)

42 Versions

  • 0.6.2                                ...           5 years ago
  • 0.6.1                                ...           5 years ago
  • 0.6.0                                ...           5 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.0                                ...           7 years ago
  • 0.2.5                                ...           7 years ago
  • 0.2.4                                ...           7 years ago
  • 0.2.3                                ...           7 years ago
  • 0.2.2                                ...           8 years ago
  • 0.2.0                                ...           8 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           8 years ago
  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
  • 0.0.27                                ...           9 years ago
  • 0.0.26                                ...           9 years ago
  • 0.0.25                                ...           9 years ago
  • 0.0.24                                ...           9 years ago
  • 0.0.23                                ...           9 years ago
  • 0.0.22                                ...           9 years ago
  • 0.0.21                                ...           9 years ago
  • 0.0.20                                ...           9 years ago
  • 0.0.19                                ...           9 years ago
  • 0.0.18                                ...           9 years ago
  • 0.0.17                                ...           9 years ago
  • 0.0.16                                ...           9 years ago
  • 0.0.15                                ...           9 years ago
  • 0.0.14                                ...           9 years ago
  • 0.0.13                                ...           9 years ago
  • 0.0.12                                ...           9 years ago
  • 0.0.11                                ...           9 years ago
  • 0.0.10                                ...           9 years ago
  • 0.0.9                                ...           9 years ago
  • 0.0.8                                ...           9 years ago
  • 0.0.7                                ...           9 years ago
  • 0.0.6                                ...           9 years ago
  • 0.0.3                                ...           9 years ago
  • 0.0.2                                ...           9 years ago
  • 0.0.1                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 17
Last Month 19
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |