# sylvanas

> Covert TS to JS

Latest version **0.6.1** (published 2020-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install sylvanas
pnpm add sylvanas
yarn add sylvanas
bun add sylvanas
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2020-11-05 |
| First published | 2019-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 292.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 43 |
| Author | zombiej |
| Maintainers | afc163, zombiej, chenshuai2144 |

## Links

- npm: https://www.npmjs.com/package/sylvanas
- Repository: https://github.com/umijs/sylvanas
- Homepage: https://github.com/umijs/sylvanas#readme
- Issues: https://github.com/umijs/sylvanas/issues
- npm.io page: https://npm.io/package/sylvanas

## Dependencies (10)

- [eslint](https://npm.io/package/eslint.md) ^7.7.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.0.1
- [prettier](https://npm.io/package/prettier.md) ^2.1.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.9.0
- [import-fresh](https://npm.io/package/import-fresh.md) ^3.1.0
- [@umijs/fabric](https://npm.io/package/@umijs/fabric.md) ^2.2.2
- [@types/prettier](https://npm.io/package/@types/prettier.md) ^1.16.4
- [@babel/plugin-syntax-decorators](https://npm.io/package/@babel/plugin-syntax-decorators.md) ^7.8.3
- [@babel/plugin-transform-typescript](https://npm.io/package/@babel/plugin-transform-typescript.md) ^7.9.4
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3

## Recent versions

- 0.6.1 (latest) — 2020-11-05
- 0.4.0-beta.2 (beta) — 2019-07-10
- 0.6.0 — 2020-11-04
- 0.4.4 — 2020-09-10
- 0.5.0 — 2020-08-31
- 0.4.3 — 2019-12-13
- 0.4.2 — 2019-09-29
- 0.4.1 — 2019-07-19
- 0.4.0 — 2019-07-14
- 0.4.0-beta.0 — 2019-07-10
- 0.3.0 — 2019-06-22
- 0.2.0 — 2019-06-16
- 0.1.0 — 2019-06-16
- 0.0.6 — 2019-06-14
- 0.0.5 — 2019-06-03
- … 5 more at https://npm.io/package/sylvanas/versions

## README

# Sylvanas

A tool to convert TypeScript to JavaScript with human-like code style.

## How to use

```bash
npm install --save-dev sylvanas
```

### sylvanas(files: string[], option?: Option)

```js
const sylvanas = require('sylvanas');

const files = glob.sync('**/*.@(ts|tsx)');

const fileList = sylvanas(files);

fileList.forEach(({ data }) => {
  console.log('Trans:', data);
});
```

### Option

#### cwd - string

The current working directory in which to search. Defaults to `process.cwd()`.

#### action - `none` | `write` | `overwrite`

Default `none`. Set what will Sylvanas do with files:

- `write`: Write new file with name of suffix `.js` or `.jsx`.
- `overwrite`: Like `write` but will remove origin files.

#### outDir - string

Set the write file folder. Defaults to `cwd`.

#### decoratorsBeforeExport - boolean

Same as [babel decoratorsbeforeexport](https://babeljs.io/docs/en/babel-plugin-proposal-decorators#decoratorsbeforeexport).

---
_Source: https://npm.io/package/sylvanas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
