Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/epicallan/js-to-ts

A simple Javascript to typescript converter CLI tool
https://github.com/epicallan/js-to-ts

cli javascript typescript

Last synced: 2 months ago
JSON representation

A simple Javascript to typescript converter CLI tool

Awesome Lists containing this project

README

        

[![npm version](https://badge.fury.io/js/%40epicallan%2Fjs-to-ts.svg)](https://badge.fury.io/js/%40epicallan%2Fjs-to-ts)

# Javascript to Typescript file convert

Heavily relying on [lebab](https://github.com/lebab/lebab) for es5 to es6 conversion

## What it does

-----

- convert es5 to es6 code
- Renames files in a directory to .ts
- delete left over js files by commandline see commands usage below

## Commands / usage

-----
install by using yarn or npm

```
npm install -g @epicallan/js-to-ts
```

`$ js-to-ts --dir ` to convert files in a specific dir

`$ js-to-ts ` to convert files in current dir

`$ js-to-ts -d` to delete all js files in current dir

`$ js-to-ts -d --dir ` to delete all js files in relative dir