create-react-library
create-react-library copied to clipboard
[INFO] How to rename the created library
This is not a question, it is just an info I find useful.
The following steps help to rename the library:
-
Find all occurrences of the old name and replace with the new name. (/) $ rg old_name --files-with-matches | xargs sed -i 's/old_name/new_name/g' Note: rg (ripgrep) must be installed
-
Delete the node_modules folder from the example/ (/) $ cd example && rm -rf node_modules
-
Reinstall example dependencies (/example) $ yarn
I created two libraries using this tool, and 2/2 libraries I had to rename at some point, so maybe other people find this useful.