Skip to content

Commit

Permalink
update frontend's graphql and material-ui libs
Browse files Browse the repository at this point in the history
  • Loading branch information
nharraud committed Nov 6, 2022
1 parent 101c632 commit 861a997
Show file tree
Hide file tree
Showing 54 changed files with 5,449 additions and 6,254 deletions.
21 changes: 21 additions & 0 deletions frontend/migrate-mui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import subprocess;

replacements = [['@material-ui/core','@mui/material'],
['@material-ui/unstyled','@mui/base'],
['@material-ui/icons','@mui/icons-material'],
['@material-ui/styles','@mui/styles'],
['@material-ui/system','@mui/system'],
['@material-ui/lab','@mui/lab'],
['@material-ui/types','@mui/types'],
['@material-ui/styled-engine','@mui/styled-engine'],
['@material-ui/styled-engine-sc','@mui/styled-engine-sc'],
['@material-ui/private-theming','@mui/private-theming'],
['@material-ui/codemod','@mui/codemod'],
['@material-ui/docs','@mui/docs'],
['@material-ui/envinfo','@mui/envinfo']]

for [before, after] in replacements:
command = f"grep -rl {before} . | xargs sed -i 's|{before}|{after}|g'"
# print(command)
with subprocess.Popen([command], stdout=subprocess.PIPE, shell=True) as proc:
print(proc.stdout.read())
Loading

0 comments on commit 861a997

Please sign in to comment.