Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get @material-ui/codemod to work for importing from 1.0.0-beta.42 to 1.0 stable #11525

Closed
2 tasks done
brandonlabuschagne opened this issue May 21, 2018 · 4 comments
Closed
2 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@brandonlabuschagne
Copy link

  • This is a v1.x issue (v0.x is no longer maintained).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I've installed the codemod as defined in the readme and run the command provided via cli:
find src -name '*.js' -print | xargs jscodeshift -t node_modules/@material-ui/codemod/lib/v1.0.0/import-path.js

I expected this to update the paths used within my application.

Current Behavior

Instead of having the paths updated, I see a console spit out saying that all changes have been skipped:

Processing 56 files...
Spawning 3 workers...
Sending 19 files to free worker...
Sending 19 files to free worker...
Sending 18 files to free worker...
All done.
Results:
0 errors
0 unmodified
56 skipped
0 ok

Context

Wondering if I'm doing this correctly as I've never used a codemod before.. Any insight will be greatly appreciated!

Your Environment

Tech Version
Material-UI v1.0.0-beta.42
React 16.3.1
@tomijange
Copy link
Contributor

I think that this feature you want isnt provided (yet).

@baer
Copy link

baer commented May 21, 2018

@brandonlabuschagne The codemod expects that you've already converted your imports from import "material-ui/Button" to import "@material-ui/core/Button". If you do a find-and-replace in your editor before running the codemod, you should be all set.

@baer
Copy link

baer commented May 21, 2018

Have a look at this comment:

#11369 (comment)

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label May 21, 2018
@oliviertassinari
Copy link
Member

@baer Thanks, I'm closing for #11369.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants