styled-components/styled-components-codemods

Difficult to know progress, or if finished

vegarsti opened this issue · 3 comments

I'm migrating to v4 and running this mod on a pretty large directory at once. So will probably take some time. I just want to be sure that it's still running, it just says

npx: installed 356 in 8.264s

Hmm no it should log something out and be ~relatively quick. On our ~100k LoC codebase it took a couple seconds, so it's probably not working?

It finished after a while, but just silently, and it doesn't appear to have worked. If I want to use it on a directory, is it correct to do this? That's what I did, at least.

npx styled-components-codemods v4-injectGlobalToCreateGlobalStyle .

No, you have to specify a glob like so:

npx styled-components-codemods v4-injectGlobalToCreateGlobalStyle './**/*.js'