Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chimurai/jscodeshift-typescript-example
jscodeshift typescript codemod example
https://github.com/chimurai/jscodeshift-typescript-example
codemod debug jest jscodeshift typescript vscode
Last synced: 3 days ago
JSON representation
jscodeshift typescript codemod example
- Host: GitHub
- URL: https://github.com/chimurai/jscodeshift-typescript-example
- Owner: chimurai
- License: mit
- Created: 2020-12-06T19:06:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T06:02:35.000Z (17 days ago)
- Last Synced: 2025-02-07T18:13:44.846Z (13 days ago)
- Topics: codemod, debug, jest, jscodeshift, typescript, vscode
- Language: JavaScript
- Homepage:
- Size: 6.88 MB
- Stars: 78
- Watchers: 3
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jscodeshift-typescript-example
## TypeScript all the way 🚀
Example usage of [jscodeshift](https://github.com/facebook/jscodeshift) _for_ TypeScript _with_ TypeScript:
- TypeScript target files *.ts
- TypeScript transformer
- TypeScript test files
- TypeScript fixtures## TypeScript transformer
Strongly typed code and code completion with `@types/jscodeshift`

## Installation
```shell
npm i
```or
```shell
yarn
```## Run codemod
```shell
npx jscodeshift -t ./examples/simple-rename.ts --extensions=ts --parser=ts './**/*.ts' --print --dry
```> _Omit `--dry` to write the transformed source back to disk._
## Test
```shell
npm test
```or
```shell
yarn test
```## Debug
Use the [pre-configured VSCode launcher](https://github.com/chimurai/jscodeshift-typescript-example/blob/main/.vscode/launch.json) to run tests and debug your transformer.

## Behind the scenes
Use `@babel/parser` in [https://astexplorer.net](https://astexplorer.net) when working with the jscodeshift's [default parser](https://github.com/facebook/jscodeshift#usage-cli) (default: `babel`).
## Resources & Inspiration
-
-
-
-## Awesome lists
-
-