Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pawanpaudel93/tsx-to-jsx
Convert Typescript (tsx/ts) to Javascript (jsx/js) files
https://github.com/pawanpaudel93/tsx-to-jsx
Last synced: about 1 month ago
JSON representation
Convert Typescript (tsx/ts) to Javascript (jsx/js) files
- Host: GitHub
- URL: https://github.com/pawanpaudel93/tsx-to-jsx
- Owner: pawanpaudel93
- License: mit
- Created: 2023-11-26T16:13:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-22T04:34:43.000Z (9 months ago)
- Last Synced: 2024-10-29T23:10:17.111Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 123 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# tsx-to-jsx
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]`tsx-to-jsx` is a Node.js package that converts TypeScript (ts/tsx) files to JavaScript (js/jsx) files from a specified source directory, saving the result in a destination directory.
## Installation
Before using the tool, make sure you have [Node.js](https://nodejs.org/) installed on your machine. Please install the package using your preferred package manager.
```bash
npm install tsx-to-jsx
``````bash
yarn add tsx-to-jsx
``````bash
pnpm add tsx-to-jsx
``````bash
bun install tsx-to-jsx
```## Usage
```Typescript
import { convertTsxToJsx } from 'tsx-to-jsx'
const srcDirectory = "/Users/pawan/ts/ReactApp/src"
const destDirectory = "/Users/pawan/js/ReactApp/src"
await convertTsxToJsx(srcDirectory, dstDirectory)
```## Related
- [tsx-to-jsx-cli](https://github.com/pawanpaudel93/tsx-to-jsx-cli)## License
[MIT](./LICENSE) License © 2023-PRESENT [Pawan Paudel](https://github.com/pawanpaudel93)
[npm-version-src]: https://img.shields.io/npm/v/tsx-to-jsx?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/tsx-to-jsx
[npm-downloads-src]: https://img.shields.io/npm/dm/tsx-to-jsx?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/tsx-to-jsx
[bundle-src]: https://img.shields.io/bundlephobia/minzip/tsx-to-jsx?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=tsx-to-jsx
[license-src]: https://img.shields.io/github/license/pawanpaudel93/tsx-to-jsx.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/pawanpaudel93/tsx-to-jsx/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/tsx-to-jsx