Skip to content

Commit

Permalink
add index to GuidanceBlock codemod (#4925)
Browse files Browse the repository at this point in the history
Co-authored-by: Geoffrey Chong <gyf.chong@gmail.com>
  • Loading branch information
gyfchong and Geoffrey Chong authored Aug 14, 2024
1 parent 84290ae commit c1d4c2b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shaggy-hornets-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": patch
---

Fix GuidanceBlock codemod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { transformComponentsInDir } from "../utils"
import { transformGuidanceBlockVariantProp } from "./transformGuidanceBlockVariantProp"
/** This is here as a script runner that updates GuidanceBlock variants to v2 variants */
const updateGuidanceBlockVariantProp = (): void => {
// eslint-disable-next-line no-console
console.log(" ~(-_- ~) Running GuidanceBlock transformer (~ -_-)~")
const targetDir = process.argv[2]
if (!targetDir) {
process.exit(1)
}

transformComponentsInDir(
targetDir,
transformGuidanceBlockVariantProp,
"GuidanceBlock"
)
}

updateGuidanceBlockVariantProp()

0 comments on commit c1d4c2b

Please sign in to comment.