sylvanas
Covert TS to JS
Last updated 6 years ago by zombiej .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install sylvanas 
SYNC missed versions from official npm registry.

Sylvanas

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

How to use

npm install --save-dev sylvanas

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

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.

Current Tags

  • 0.4.0-beta.2                                ...           beta (5 years ago)
  • 0.6.1                                ...           latest (4 years ago)

20 Versions

  • 0.6.1                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.4.4                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.3                                ...           5 years ago
  • 0.4.2                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.4.0-beta.2                                ...           5 years ago
  • 0.4.0-beta.0                                ...           5 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE