feat: lead the home with an invitation to list a plugin
The home opened with a definition of a plugin and left 'Add your plugin' for the end. It now says where to publish and how to be listed, and the definition and review criteria move to CONTRIBUTING. It also stops claiming automatic checks that do not run yet. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
5 files changed
+76
-37
No files matched your search
@@ -0,0 +1,44 @@
|
|||||||
|
# Listing a plugin
|
||||||
|
|
||||||
|
## What counts as a green-tea plugin
|
||||||
|
|
||||||
|
A factory that returns `{ name, mount }`. It imports `@green-tea/core` as types only, with core in
|
||||||
|
`devDependencies`, so installing the plugin never pulls in a second copy of core. It needs
|
||||||
|
`@green-tea/core@26.9.0-beta.2` or newer. That is the release where plugins took this shape and
|
||||||
|
`app.boot()` became public.
|
||||||
|
|
||||||
|
## Where to publish it
|
||||||
|
|
||||||
|
JSR is what we recommend. It records which runtimes a package supports, and the listing shows
|
||||||
|
that on every card.
|
||||||
|
|
||||||
|
npm works too, as long as the package is ESM only: `"type": "module"`, no `require` condition, and
|
||||||
|
no `.cjs` file in `main` or `exports`. Dual ESM/CJS packages are turned away. green-tea is ESM from
|
||||||
|
end to end, and a `require` path is the first thing to break when the Node version floor moves.
|
||||||
|
|
||||||
|
## Add the entry
|
||||||
|
|
||||||
|
Add one file, `src/content/plugins/<name>.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jsr: "@your-scope/green-tea-your-plugin" # or npm: green-tea-your-plugin
|
||||||
|
repo: https://github.com/you/green-tea-your-plugin
|
||||||
|
description: "One sentence, 20 to 200 characters."
|
||||||
|
```
|
||||||
|
|
||||||
|
Names follow one pattern per registry: `green-tea-<x>` or `@scope/green-tea-<x>` on npm,
|
||||||
|
`@scope/<x>` on JSR. There is no version field and no runtimes field. The listing reads both from
|
||||||
|
the registry, so your entry can't go stale.
|
||||||
|
|
||||||
|
## What gets checked
|
||||||
|
|
||||||
|
The build checks two things on its own: the package exists on the registry you named, and an npm
|
||||||
|
package is ESM only. A package that fails either one is not listed.
|
||||||
|
|
||||||
|
A person checks the rest. The package has to be a factory returning `{ name, mount }` and keep
|
||||||
|
core as a type-only dependency. Its README has to cover all four runtimes (Node, Deno, Bun,
|
||||||
|
workerd) and give a reason next to each one it doesn't support.
|
||||||
|
|
||||||
|
## When it goes live
|
||||||
|
|
||||||
|
Merged entries go out with the next Friday cut.
|
||||||
@@ -8,7 +8,7 @@ const linkColumns = [
|
|||||||
{
|
{
|
||||||
heading: 'This listing',
|
heading: 'This listing',
|
||||||
links: [
|
links: [
|
||||||
{ label: 'Add your plugin', href: '#contribute', external: false },
|
{ label: 'Add your plugin', href: '/plugins/#contribute', external: false },
|
||||||
{
|
{
|
||||||
label: 'Source',
|
label: 'Source',
|
||||||
href: 'https://github.com/Expressive-Tea/green-tea-marketplace',
|
href: 'https://github.com/Expressive-Tea/green-tea-marketplace',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Icon from './Icon.astro';
|
|||||||
// what this one is. The logo links out to green-tea rather than to `/`, because a reader who
|
// what this one is. The logo links out to green-tea rather than to `/`, because a reader who
|
||||||
// clicks a brand mark is asking for the project, and the project lives elsewhere.
|
// clicks a brand mark is asking for the project, and the project lives elsewhere.
|
||||||
const navLinks = [
|
const navLinks = [
|
||||||
{ label: 'Add your plugin', href: '#contribute', external: false },
|
{ label: 'Add your plugin', href: '/plugins/#contribute', external: false },
|
||||||
{ label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true },
|
{ label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true },
|
||||||
{ label: 'green-tea', href: 'https://green-tea.expressive-tea.io', external: true },
|
{ label: 'green-tea', href: 'https://green-tea.expressive-tea.io', external: true },
|
||||||
{
|
{
|
||||||
|
|||||||
+23
-35
@@ -21,6 +21,14 @@ const plugins = (await getCollection('plugins'))
|
|||||||
internal: (data.jsr ?? data.npm ?? '').startsWith('@green-tea/'),
|
internal: (data.jsr ?? data.npm ?? '').startsWith('@green-tea/'),
|
||||||
}))
|
}))
|
||||||
.sort((a, b) => a.name.localeCompare(b.name));
|
.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
// "Add your plugin" opens GitHub's new-file editor inside this repo with an example already
|
||||||
|
// filled in, so a contributor edits a few lines and opens the pull request from there.
|
||||||
|
const EXAMPLE = `jsr: "@your-scope/green-tea-your-plugin" # recommended. Or npm: green-tea-your-plugin (ESM only)
|
||||||
|
repo: https://github.com/you/green-tea-your-plugin
|
||||||
|
description: "One sentence, 20 to 200 characters."
|
||||||
|
`;
|
||||||
|
const ADD_URL = `https://github.com/Expressive-Tea/green-tea-marketplace/new/main/src/content/plugins?filename=green-tea-your-plugin.yaml&value=${encodeURIComponent(EXAMPLE)}`;
|
||||||
|
const CONTRIBUTING = 'https://github.com/Expressive-Tea/green-tea-marketplace/blob/main/CONTRIBUTING.md';
|
||||||
---
|
---
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -29,7 +37,7 @@ const plugins = (await getCollection('plugins'))
|
|||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<link rel="icon" href="/plugins/favicon.svg" type="image/svg+xml" />
|
<link rel="icon" href="/plugins/favicon.svg" type="image/svg+xml" />
|
||||||
<title>Green Tea. plugins</title>
|
<title>Green Tea. plugins</title>
|
||||||
<meta name="description" content="Plugins for green-tea, with the runtimes each one declares." />
|
<meta name="description" content="List your green-tea plugin. JSR recommended; npm works too, as long as it is ESM only." />
|
||||||
<link rel="canonical" href="https://green-tea.expressive-tea.io/plugins" />
|
<link rel="canonical" href="https://green-tea.expressive-tea.io/plugins" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -37,51 +45,31 @@ const plugins = (await getCollection('plugins'))
|
|||||||
|
|
||||||
<main>
|
<main>
|
||||||
<section class="hero wrap">
|
<section class="hero wrap">
|
||||||
<h1>Plugins</h1>
|
<h1>Built a green-tea plugin? List it here.</h1>
|
||||||
<p class="hero__lead">
|
<p class="hero__lead">
|
||||||
A plugin is a named object that adds steps and providers to your graph. It imports
|
Publish it to JSR (our recommendation) or to npm as ESM only. Then add one small file to
|
||||||
green-tea as types only, so installing one never pulls a second copy of core.
|
this repo, and it shows up on the next Friday cut.
|
||||||
</p>
|
</p>
|
||||||
<p class="requires">
|
<p class="hero__actions">
|
||||||
Everything here needs <code>@green-tea/core@26.9.0-beta.2</code> or newer. That is the
|
<a class="button" href={ADD_URL}>Add your plugin</a>
|
||||||
release where a plugin became <code>{ name, mount }</code> and
|
<a class="button button--ghost" href="#plugins">Browse plugins</a>
|
||||||
<code>app.boot()</code> went public; on anything older these will not mount.
|
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="wrap">
|
<section class="wrap" id="plugins" aria-label="Plugins">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
{plugins.map((plugin) => <PluginCard {...plugin} />)}
|
{plugins.map((plugin) => <PluginCard {...plugin} />)}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="contribute wrap" id="contribute">
|
<section class="contribute wrap" id="contribute">
|
||||||
<h2>Add your plugin</h2>
|
<h2>How it works</h2>
|
||||||
<p>
|
<ol class="steps">
|
||||||
Fork the listing, add one file under <code>src/content/plugins/</code>, open a pull
|
<li>Publish to JSR, or to npm as an ESM-only package.</li>
|
||||||
request. There is no version and no runtimes field — both are read from the registry, so
|
<li>Open a pull request that adds one yaml file.</li>
|
||||||
your entry cannot go stale.
|
<li>When it merges, it goes live the next Friday.</li>
|
||||||
</p>
|
</ol>
|
||||||
|
<p>What counts as a plugin, and what a reviewer checks, is in <a href={CONTRIBUTING}>CONTRIBUTING.md</a>.</p>
|
||||||
<pre><code>npm: green-tea-foo # at least one of npm / jsr
|
|
||||||
jsr: "@acme/green-tea-foo"
|
|
||||||
repo: https://github.com/acme/green-tea-foo
|
|
||||||
description: "One sentence, 20–200 characters."</code></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A check runs against npm and JSR: the package has to exist, depend on
|
|
||||||
<code>@green-tea/core</code>, and declare at least one runtime. Then a person reads it —
|
|
||||||
that it really is a factory returning <code>{ name, mount }</code>, and that its
|
|
||||||
README lists all four runtimes with a reason beside each one it does not support.
|
|
||||||
</p>
|
|
||||||
<p class="contribute__cadence">
|
|
||||||
Merged entries go live on the next <strong>Friday</strong> cut.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="button" href="https://github.com/Expressive-Tea/green-tea-marketplace">
|
|
||||||
Open the listing on GitHub →
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
@@ -419,3 +419,10 @@ main {
|
|||||||
.plugin__body { grid-template-columns: 1fr; }
|
.plugin__body { grid-template-columns: 1fr; }
|
||||||
.versions { order: -1; }
|
.versions { order: -1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
|
||||||
|
.button--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
|
||||||
|
.button--ghost:hover { border-color: var(--matcha); }
|
||||||
|
.steps { padding-left: 1.25rem; }
|
||||||
|
.steps li { padding-block: 0.25rem; }
|
||||||
|
.contribute a:not(.button) { color: var(--matcha); }
|
||||||
Reference in new issue
Block a user