https://github.com/kinngh/polaris-react-to-wc-codemod
[WIP] Migrate Polaris React to Web Components
https://github.com/kinngh/polaris-react-to-wc-codemod
polaris-react react shopify shopify-polaris web-components
Last synced: 8 months ago
JSON representation
[WIP] Migrate Polaris React to Web Components
- Host: GitHub
- URL: https://github.com/kinngh/polaris-react-to-wc-codemod
- Owner: kinngh
- Created: 2025-04-09T15:48:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-22T18:29:36.000Z (about 1 year ago)
- Last Synced: 2025-07-18T07:43:56.485Z (11 months ago)
- Topics: polaris-react, react, shopify, shopify-polaris, web-components
- Language: JavaScript
- Homepage: https://x.com/kinngh
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [WIP] Polaris React to Web Components Codemod
A minimal migrator for converting Polaris React Components into Web Components. The migration isn't perfect and still misses a lot of baselines, but is a good starting point
Open `src/index.js` and update `const targetDir = path.join(process.cwd(), "pages", "react");` to point to your dir of jsx files. CLI coming in later patches.
## Notes
I've been using Polaris Web Components for a decent while and wanted to do most of the heavy lifting of renaming components and bringing over most of the props and functions over to the new format. The idea of building this is to learn how codemods work so there's going to be a whole lot of experiments with this repo.