v0.6.1
A tool to convert TypeScript to JavaScript with human-like code style.
npm install --save-dev sylvanas
const sylvanas = require('sylvanas'); const files = glob.sync('**/*.@(ts|tsx)'); const fileList = sylvanas(files); fileList.forEach(({ data }) => { console.log('Trans:', data); });
The current working directory in which to search. Defaults to process.cwd().
process.cwd()
none
write
overwrite
Default none. Set what will Sylvanas do with files:
.js
.jsx
Set the write file folder. Defaults to cwd.
cwd
Same as babel decoratorsbeforeexport.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Sylvanas
A tool to convert TypeScript to JavaScript with human-like code style.
How to use
sylvanas(files: string[], option?: Option)
Option
cwd - string
The current working directory in which to search. Defaults to
process.cwd().action -
none|write|overwriteDefault
none. Set what will Sylvanas do with files:write: Write new file with name of suffix.jsor.jsx.overwrite: Likewritebut will remove origin files.outDir - string
Set the write file folder. Defaults to
cwd.decoratorsBeforeExport - boolean
Same as babel decoratorsbeforeexport.