Coder Social home page Coder Social logo

fabianwildgrube / node-typescript-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from buehler/node-typescript-parser

0.0 0.0 0.0 751 KB

Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.

License: MIT License

TypeScript 70.00% JavaScript 30.00%

node-typescript-parser's Introduction

Fork of node-typescript-parser

This fork adds that the decorators of properties of a class are now also analyzed and added to the AST that node-typescript-parser creates.

To ensure that this fork can be used as a npm dependency directly from github, make sure to run npm build and commit the built resources for every code update!

The following is the original project description:

node typescript parser

This package is a TypeScript and ECMAScript parser. It uses the underlying typescript parser to generate a more or less human readable AST out of .js or .ts files.

Build Status Build Status Windows npm codecov semantic-release Greenkeeper badge Gitter

How to use

After you install the package via:

NPM

You can use the parser with:

const parser = new TypescriptParser();

// either:
const parsed = await parser.parseSource(/* typescript source code as string */);

// or a filepath
const parsed = await parser.parseFile('/user/myfile.ts', 'workspace root');

You can also parse multiple files at ones.

To use the declaration index (which is basically a list of symbols for your files) instantiate an index first and throw him some files.

After the parsing is done, you'll get an index with resolved exports and declarations.

Keep in mind, that the index'll only contain exported declarations.

Changelog

The changelog is generated by semantic release and is located under the release section.

Licence

This software is licenced under the MIT licence.

node-typescript-parser's People

Contributors

asvetliakov avatar benedikt-roth avatar buehler avatar cspotcode avatar greenkeeper[bot] avatar maennchen avatar naeramarth7 avatar ondratra avatar rozzzly avatar shobhitg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.