Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sagarpreet opened this issue Oct 7, 2020 · 11 comments

Comments

@Sagarpreet
Copy link
Contributor

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/

@Shulammite-Aso
Copy link
Collaborator

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 😃

@Sagarpreet
Copy link
Contributor Author

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

@Janitham97
Copy link

@Sagarpreet kindly can you add more details?

@sagarpreet-chadha
Copy link
Contributor

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 🚀

@Janitham97
Copy link

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

@Sagarpreet
Copy link
Contributor Author

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 😄

@nshah1729
Copy link

Can anyone assign me a beginner-friendly issue?

@bolajahmad
Copy link

bolajahmad commented Nov 2, 2021

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

@unnati914
Copy link

could I work on this? if its available?

@joannasjohnraj
Copy link

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

@Aman0307
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants