This is a repository for contributors who would like to test dotting locally. This repository was created since testing dotting
locally has issues due to react and react-dom version mismatch.
This repository has referenced how-to-test-custom-react-library-locally
You must have dotting
library installed in your local machine. For this test repository to work you should run some scripts in the dotting
library beforehand. Also, you must have this library cloned in the same directory as this repository.
/some-directory
├── dotting
└── dotting-test
Go to dotting and clone the dotting
project. After cloing dotting, freely edit the parts you would like to change.
Inside the dotting
directory, run the following command.
yarn prepublishOnly
This will compile your typescript files into javascript files that can be used in other projects. Remember that if you change anything in dotting
and want to see the effect, you must run this command again!
Inside the dotting
directory, run the following command.
yarn link-local
This will automatically create necessary symbolic links to the dotting
, react
, and react-dom
libraries. Once you have run this command, you do not need to run this command again unless you want to unlink.
Clone this repository. After cloning, go to the dotting-test
directory and run the following command.
yarn install
Inside the dotting-test
directory, run the following command.
yarn link-local-dotting
This will make this repository link to the libraries set in the dotting
library.
If you see dotting:link:../dotting
inside your package.json, it means that the linking was successful.
Inside the dotting-test
directory, run the following command.
yarn start
Now the dotting-test
project will open in your localhost!
After you have done editting, you can unlink libraries. Inside the dotting-test
directory, run the following command.
yarn unlink-local-dotting
Inside the dotting
directory, run the following command.
yarn unlink-local
Now you have successfully unlinked the libraries.