How to use the ngast.ContextSymbols function in ngast

To help you get started, we’ve selected a few ngast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github compodoc / ngd / src / modules / compiler / src / compiler / ngast.ts View on Github external
getDependencies(): Dependencies[] {
    const contextSymbols = new ContextSymbols(this.program, this.resourceResolver);
    // console.log('getModules::', contextSymbols.getModules().pop());
    fs.writeFileSync(
      './xxxxxxxxx.json', 
      JSON.stringify(contextSymbols.getContextSummary() /*.map( d => d._symbol.name )*/, null, 2)
    );

    // @todo we should return this type
    // {
    //   name,
    //   file: srcFile.fileName.split('/').splice(-3).join('/'),
    //   providers: this.getModuleProviders(props),
    //   declarations: this.getModuleDeclations(props),
    //   imports: this.getModuleImports(props),
    //   exports: this.getModuleExports(props),
    //   bootstrap: this.getModuleBootstrap(props),
    //   __raw: props
github compodoc / ngd / src / modules / compiler / dist / compiler / ngast.js View on Github external
NgAst.prototype.getDependencies = function () {
        var contextSymbols = new ngast_1.ContextSymbols(this.program, this.resourceResolver);
        // console.log('getModules::', contextSymbols.getModules().pop());
        fs.writeFileSync('./xxxxxxxxx.json', JSON.stringify(contextSymbols.getContextSummary() /*.map( d => d._symbol.name )*/, null, 2));
        // @todo we should return this type
        // {
        //   name,
        //   file: srcFile.fileName.split('/').splice(-3).join('/'),
        //   providers: this.getModuleProviders(props),
        //   declarations: this.getModuleDeclations(props),
        //   imports: this.getModuleImports(props),
        //   exports: this.getModuleExports(props),
        //   bootstrap: this.getModuleBootstrap(props),
        //   __raw: props
        // };
        return [];
    };
    NgAst.prototype.getFileName = function (contextSymbols) {

ngast

Parsing tools for Angular. The project is an abstraction over the Angular compiler which provides friendly interface.

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis