PublicLab.Editor
PublicLab.Editor copied to clipboard
Document how to connect easily plots2 and PL.editor projects for local development
Hi,
We have already written amazing documentation on how to connect the 2 projects here , however it requires us to do yarn install --force
in plots2 every time we do change in PL.editor.
Let's use yarn link
instead and make it seamless 😄
Resources: https://classic.yarnpkg.com/en/docs/cli/link/
Hi @Sagarpreet i think outreachy applicants can work on this right?
If you think that would be necessary, maybe add some more straightforward details about how to do this like is with the other FTO issues? My thought is that some new comers may not immediately grasp the yarn docs enough to apply it in our own doc :smiley:
Great idea @Shulammite-Aso, sure will do 😄 !
@Sagarpreet kindly can you add more details?
So while working in PL.editor, many times it is required to test your changes in plots2 project.
So the current way of doing it is documented here: https://github.com/publiclab/PublicLab.Editor#creating-a-mock-server
Which requires u to do change package.json
and give path to your local copy of PL.editor and do yarn install --force
everytime you do change in PL.editor which is cumbersome and takes a lot of dev time.
Better way to do is to use yarn link
:
You have to simply do these steps:
- In PublicLab.Editor folder project run
yarn link
- In plots2 folder
yarn run PublicLab.Editor
If you have watcher running in PublicLab.Editor project, that will build /dist
folder everytime you do a changes, then these changes will be automatically be visible to plots2 repo because a symlink is created between PublicLab.Editor
folder and plots2/node_module/ PublicLab.Editor
folder.
Hence saving a lot of dev time and doing development seamless. I hope this helps to understand the flow 😄
Thanks @Janitham97 @ebarry @Shulammite-Aso 🚀
I did yarn link in PublicLab.Editor folder
success Registered "publiclab-editor".
info You can now run yarn link "publiclab-editor"
in the projects where you want to use this package and it will be used instead.
Done in 0.40s.
But I can't see plots2 folder in PublicLab.Editor.
Sorry for If I made any wrong
Hey @Janitham97 , plots2 is a different project where PublicLab.Editor is used: https://github.com/publiclab/plots2 If you understood the flow, you can work on documenting it if you like 😄
Can anyone assign me a beginner-friendly issue?
Hello, is anyone working on this task now?? I am interested in this, has a PR been opened for this? Please assign it to me, if it's still available
could I work on this? if its available?
Is this issue still open? I would like to work on it.
@sagarpreet-chadha I would like to contribute to this issue.