Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makafsal/codemod-sandbox
Sandbox for Carbon codemods
https://github.com/makafsal/codemod-sandbox
Last synced: 7 days ago
JSON representation
Sandbox for Carbon codemods
- Host: GitHub
- URL: https://github.com/makafsal/codemod-sandbox
- Owner: makafsal
- License: mit
- Created: 2024-10-16T10:05:25.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T14:35:57.000Z (about 2 months ago)
- Last Synced: 2024-12-15T02:06:19.831Z (8 days ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# codemod-sandbox
> A Sandbox to try out `@carbon/upgrade` [package](https://github.com/carbon-design-system/carbon/tree/main/packages/upgrade) Codemods.## Getting started
```console
# Clone the repo
git clone [email protected]:makafsal/codemod-sandbox.git# Change to app directory
cd codemod-sandbox# Create your branch
git checkout -b# Install dependencies
yarn
```### Run Migration Transforms
Please refer to the `@carbon/upgrade` usage section [here](https://github.com/carbon-design-system/carbon/tree/main/packages/upgrade#usage).### Run Transforms Using `jscodeshift`
```console
npx jscodeshift -t
```
For example:
```console
npx jscodeshift -t node_modules/@carbon/upgrade/transforms/sort-prop-types.js src/UnsortedPropExample/UnsortedPropExample.jsx
```## [Demo](https://github.com/carbon-design-system/ibm-products/issues/6155#issuecomment-2422282828)
Please have a look at [Demo](https://github.com/carbon-design-system/ibm-products/issues/6155#issuecomment-2422282828).