ng-ast / Ngast
Parser for Angular projects.
Stars: ✭ 152
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Ngast
Bellybutton
Custom Python linting through AST expressions
Stars: ✭ 196 (+28.95%)
Mutual labels: static-analysis, ast
Php Parser
A PHP parser written in PHP
Stars: ✭ 15,101 (+9834.87%)
Mutual labels: static-analysis, ast
klara
Automatic test case generation for python and static analysis library
Stars: ✭ 250 (+64.47%)
Mutual labels: static-analysis, ast
unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 119 (-21.71%)
Mutual labels: static-analysis, ast
Unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 96 (-36.84%)
Mutual labels: static-analysis, ast
Spoon
Spoon is a metaprogramming library to analyze and transform Java source code (up to Java 15). 🥄 is made with ❤️, 🍻 and ✨. It parses source files to build a well-designed AST with powerful analysis and transformation API.
Stars: ✭ 1,078 (+609.21%)
Mutual labels: static-analysis, ast
Ts Morph
TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Stars: ✭ 2,384 (+1468.42%)
Mutual labels: static-analysis, ast
Piranha
A tool for refactoring code related to feature flag APIs
Stars: ✭ 1,840 (+1110.53%)
Mutual labels: ast
Js Sql Parser
SQL(select) parser written with jison. parse SQL into abstract syntax tree(AST) and stringify back to SQL. sql grammar follows https://dev.mysql.com/doc/refman/5.7/en/select.html
Stars: ✭ 141 (-7.24%)
Mutual labels: ast
Dependency Cruiser
Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
Stars: ✭ 2,326 (+1430.26%)
Mutual labels: static-analysis
Awesome Machine Learning Deep Learning Mathematics
A curated list of mathematics documents ,Concepts, Study Materials , Algorithms and Codes available across the internet for machine learning and deep learning
Stars: ✭ 138 (-9.21%)
Mutual labels: static-analysis
Crab Llvm
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 143 (-5.92%)
Mutual labels: static-analysis
I18n Tasks
Manage translation and localization with static analysis, for Ruby i18n
Stars: ✭ 1,748 (+1050%)
Mutual labels: static-analysis
Sys
Sys: A Static/Symbolic Tool for Finding Good Bugs in Good (Browser) Code
Stars: ✭ 149 (-1.97%)
Mutual labels: static-analysis
Php testability
Analyses and reports testability issues of a php codebase
Stars: ✭ 136 (-10.53%)
Mutual labels: static-analysis
Ml
sourced.ml is a library and command line tools to build and apply machine learning models on top of Universal Abstract Syntax Trees
Stars: ✭ 136 (-10.53%)
Mutual labels: ast
Perl Critic
The leading static analyzer for Perl. Configurable, extensible, powerful.
Stars: ✭ 149 (-1.97%)
Mutual labels: static-analysis
Nativejsx
JSX to native DOM API transpilation. 💛 <div> ⟹ document.createElement('div')!
Stars: ✭ 145 (-4.61%)
Mutual labels: ast
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 withngcc
(runng serve
,ng build
ornpx 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:
- ngrev - Tool for reverse engineering of Angular applications.
- codelyzer - Static code analysis for Angular projects.
- ngworld - Visualization of Angular projects.
- ng-app-counter - Counter for Angular applications.
- ng-pathfinder - Show a list of all routes in an angular application.
- ngx-translate-all - Tool for automate i18n Angular projects.
- ngx-translate-migrate - Tool for migrate from ngx-translate to Angular i18n.
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].