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

Local deployment and use in Penpot (early) #4

Open
jdittrich opened this issue Sep 11, 2024 · 1 comment
Open

Local deployment and use in Penpot (early) #4

jdittrich opened this issue Sep 11, 2024 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jdittrich
Copy link

Context: I want to be able to test my plugin when having basic knowledge of HTML, CSS and javascript.

Problem: "Load your local plugin" in the readme suggests "In Penpot (early) … Enter the manifest URL: In the Plugin Manager, provide the URL for your local plugin's manifest file. For a local setup, this URL will be: http://localhost:4400/manifest.json." (source)

This might is actually not possible (at least I failed trying this): Your Penpot instance runs in another network than my localhost, so following the instructions probably fails.

Current solution (probably): I would probably need either to depoy my plugin first to a place which can be reached from the web OR run a local instance of penpot on my computer which can access localhost (Probably there are other solutions as well, needing various degrees of skills and acceptance of security risks).

Ideal solutions:
a) Run an easy-to-configure docker instance of penpot locally that I just need to tell the folder where my plugin is located, so I can immediately check it when I do code changes. This might still need some basic docker skills but could probably be documented.
b) Be able to drop a zip with the plugin into the plugin manager to install and try it.

…ideally both would work: b) for prople who do not want to touch docker at all, a) for people with very basic docker skills. Both would be easier than a "proper" deployment.

@mavalroot
Copy link
Contributor

Hello, @jdittrich !!

We appreciate your ideas and we'll take them into consideration, but loading your local plugin in early should be possible. As we can't reproduce this issue, can you check again and tell us if there's any error showing up?

Try the following steps:

git clone https://github.com/penpot/penpot-plugin-starter-template.git

cd penpot-plugin-starter-template

npm install

npm run dev

Please confirm that http://localhost:4400/ and http://localhost:4400/manifest.json are both reachable in your browser.

If they are, try to load http://localhost:4400/manifest.json as intended in any file in https://early.penpot.dev/ through the plugin manager.

Does it work? Are there any error showing up in the browser console (f12)?

Thank you!!

@mavalroot mavalroot added bug Something isn't working documentation Improvements or additions to documentation labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants