{{[[TODO]]}} #[[(hidden) jOMmlCP4S]] re: [[(hidden) wJyVZW0Tm]]
-
https://danburzo.ro/javascript-codemods/
-
we could have a pre-processing transform that would collect all imports, exports and wraps around our components, and then use that output inside the transforms that rely on that information!
-
{{[[TODO]]}} need to specify transform dependencies inside transform
-
{{[[TODO]]}} need [[(hidden) vkt9VljJ3]] for transforms, and to run each sub-level sequentually in the codeshift-cli.
-
each transform would get an additional arg - `outputsFromDependencies`, and would use `outputsFromDependencies[transformFnThatGeneratedThatOutput]` to access the specific outputs
-
{{[[TODO]]}} and each transform would return not only the modified source, but also the outputs.
-
idea taken exactly from [[roam-traverse-graph]] :D
-
{{[[TODO]]}} update template to `export const myTransform: Transform = () => ...`
-
sidenote / #observation - #[[(hidden) DY6wPnICE]] there's so much #[[(hidden) K0RqswvNf]]!
-
likely will need to use recast or whatever lower level lib & read file contents w/ fs to be able to traverse full graph.
-
i. e. find all files that import e. g. a button from cui
-
then, for each file, find what wraps it - other elements, styled, etc
-
check if the wrapper are exported