PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

Document how to connect easily plots2 and PL.editor projects for local development

Open Sagarpreet opened this issue 4 years ago • 11 comments

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/

Sagarpreet avatar Oct 07 '20 07:10 Sagarpreet

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:

Shulammite-Aso avatar Oct 12 '20 20:10 Shulammite-Aso

Great idea @Shulammite-Aso, sure will do 😄 !

Sagarpreet avatar Oct 13 '20 06:10 Sagarpreet

@Sagarpreet kindly can you add more details?

Janitham97 avatar Oct 16 '20 17:10 Janitham97

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 🚀

sagarpreet-chadha avatar Oct 19 '20 18:10 sagarpreet-chadha

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

Janitham97 avatar Oct 20 '20 10:10 Janitham97

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 😄

Sagarpreet avatar Oct 20 '20 10:10 Sagarpreet

Can anyone assign me a beginner-friendly issue?

nshah1729 avatar Oct 12 '21 12:10 nshah1729

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

bolajahmad avatar Nov 02 '21 10:11 bolajahmad

could I work on this? if its available?

unnati914 avatar Dec 12 '21 17:12 unnati914

Is this issue still open? I would like to work on it.

joannasjohnraj avatar Aug 23 '22 04:08 joannasjohnraj

@sagarpreet-chadha I would like to contribute to this issue.

Aman0307 avatar Oct 14 '22 10:10 Aman0307