Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/saber2pr/ts-compiler

Typescript Compiler Utils.
https://github.com/saber2pr/ts-compiler

compiler typescript

Last synced: 10 days ago
JSON representation

Typescript Compiler Utils.

Awesome Lists containing this project

README

        

# @saber2pr/ts-compiler

[![npm](https://img.shields.io/npm/v/@saber2pr/ts-compiler.svg?color=blue)](https://www.npmjs.com/package/@saber2pr/ts-compiler)
[![codecov](https://codecov.io/gh/Saber2pr/ts-compiler/branch/master/graph/badge.svg?token=DI9E88OIZU)](https://codecov.io/gh/Saber2pr/ts-compiler)

> ts compiler utils.

```bash
yarn add @saber2pr/ts-compiler
```

### Usage

see document: https://saber2pr.top/ts-compiler/

```ts
import {
readTsExport,
readTsFileExport,
traverser,
} from '@saber2pr/ts-compiler'

readTsFileExport('./test.ts').then(res => {
// res is value exported from ./test.ts
console.log(res)
console.log(res.test)
})

const ast = traverser.createAstNode(`your code`)
traverser.findJsxElementByTagName(ast, 'View')
// traverser.findXXX
```