Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thierryc committed Jul 5, 2024
0 parents commit f8d57ad
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/index-DS1TjvAw.css

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Penpot plugin example</title>
<script type="module" crossorigin src="/index.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DS1TjvAw.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=n(e);fetch(e.href,t)}})();document.querySelector("#app").innerHTML=`
<div>
<p>Penpot plugin starter template</p>
<p>Checkout the <a href="">documentation</a> to get started.</p>
</div>
`;
7 changes: 7 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Penpot starter plugin",
"host": "http://localhost:4400",
"code": "plugin.js",
"description": "This is a starter plugin for Penpot",
"permissions": ["page:read", "file:read", "selection:read"]
}
1 change: 1 addition & 0 deletions plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Hello from the plugin!");penpot.ui.open("Penpot plugin starter template","");

0 comments on commit f8d57ad

Please sign in to comment.