Skip to content

Commit fb42ac0

Browse files
authored
Merge pull request #17 from PureStackStudio/optimize-dev-server
Avoid redundant dev-server generation and batch watcher updates.
2 parents b5ea82e + d810ec6 commit fb42ac0

33 files changed

Lines changed: 482 additions & 98 deletions

File tree

‎frontend/components/studioFeature.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const studioFeatureTemplate = html`<Panel
3232
r-if="href"
3333
class="text-link"
3434
:href="href"
35+
target="_blank"
36+
rel="noopener"
3537
tone="accent"
3638
variant="link"
3739
icon="tabler:arrow-up-right"

‎frontend/components/studioPackage.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface StudioPackage {
88
href?: RefOrValue<string>
99
}
1010

11-
const studioPackageTemplate = html`<a class="package-card" :href="href">
11+
const studioPackageTemplate = html`<a class="package-card" :href="href" target="_blank" rel="noopener">
1212
<span class="package-number">{{ number }}</span>
1313
<SectionHeader :title="title" :subtitle="summary" titleTag="h3">
1414
<code>{{ packageName }}</code>

‎frontend/docs/componentGuide.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function defineComponentGuideComponents() {
2828
<div class="component-header__identity"><code>{{ name }}</code><span>{{ kind }}</span></div>
2929
<nav class="component-header__links" aria-label="Component resources">
3030
<a href="#api-reference">API <span aria-hidden="true">↗</span></a>
31-
<a :href="source" target="_blank" rel="noopener noreferrer">Source <span aria-hidden="true">↗</span></a>
31+
<a :href="source" target="_blank" rel="noopener">Source <span aria-hidden="true">↗</span></a>
3232
</nav>
3333
</div>
3434
<p class="component-header__summary">{{ summary }}</p>

‎frontend/purestack.studio/components/actions/buttons/buttons.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ The form handles `@reset.prevent` so its reactive value stays synchronized with
321321
</nav>
322322
</div>
323323

324-
[Open the playground](#playground) · [Read the component definition](https://github.com/PureStackStudio/PureStack/blob/main/packages/ts-components/src/standard/btn/btn.ts)
324+
[Open the playground](#playground) · <a href="https://github.com/PureStackStudio/PureStack/blob/main/packages/ts-components/src/standard/btn/btn.ts" target="_blank" rel="noopener">Read the component definition</a>
325325

326326
### Appearance
327327

‎frontend/purestack.studio/components/footer.mdx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
tone="neutral"
55
variant="none"
66
>
7-
<template #legal> </template>
7+
<template #social>
8+
<a href="https://github.com/PureStackStudio/PureStack" target="_blank" rel="noopener" aria-label="PureStack GitHub repository"><Icon name="tabler:brand-github"/></a>
9+
<a href="https://x.com/purestackstudio" target="_blank" rel="noopener" aria-label="PureStack Studio on X"><Icon name="tabler:brand-x"/></a>
10+
</template>
811
</SiteFooter>
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
<TopBar tone="neutral" variant="glass" class="spotlight-from-top-right"/>
1+
<TopBar tone="neutral" variant="glass" class="spotlight-from-top-right">
2+
<template #actions>
3+
<a class="topbar__icon" href="https://github.com/PureStackStudio/PureStack" target="_blank" rel="noopener" aria-label="PureStack GitHub repository">
4+
<Icon name="tabler:brand-github"/>
5+
</a>
6+
<a class="topbar__icon" href="https://x.com/purestackstudio" target="_blank" rel="noopener" aria-label="PureStack Studio on X">
7+
<Icon name="tabler:brand-x"/>
8+
</a>
9+
</template>
10+
</TopBar>

‎frontend/purestack.studio/components/site/top-bar/top-bar.mdx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ TopBar renders a fixed doc-nav-toggle ID and should appear once per document. It
231231

232232
<div class="api-contract">
233233
<p>
234-
No slots. Register defineTopBarComponents and the selected logo component,
234+
Use the actions slot to add links or controls beside the theme toggle.
235+
Register defineTopBarComponents and the selected logo component,
235236
SearchBox, ThemeToggle, SignIn, Flex and Icon families. Standard SSG
236237
registration provides these dependencies.
237238
</p>

‎frontend/purestack.studio/footer.mdx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
</div>
1414
<div>
1515
<span class="footer-label">OPEN SOURCE</span
16-
><a href="https://github.com/PureStackStudio/PureStack">GitHub ↗</a
17-
><a href="https://github.com/PureStackStudio/PureStack/issues"
16+
><a href="https://github.com/PureStackStudio/PureStack" target="_blank" rel="noopener">GitHub ↗</a
17+
><a href="https://github.com/PureStackStudio/PureStack/issues" target="_blank" rel="noopener"
1818
>Issues ↗</a
1919
><a
20-
href="https://github.com/PureStackStudio/PureStack/blob/main/LICENSE"
20+
href="https://github.com/PureStackStudio/PureStack/blob/main/LICENSE" target="_blank" rel="noopener"
2121
>MIT license ↗</a
2222
>
2323
</div>
@@ -29,6 +29,8 @@
2929
><span class="status-dot"></span>Made for what comes next.</span
3030
><span class="footer-actions"
3131
><span class="consent-settings-teleport-area"></span
32+
><a href="https://github.com/PureStackStudio/PureStack" target="_blank" rel="noopener" aria-label="PureStack GitHub repository"><Icon name="tabler:brand-github"/></a
33+
><a href="https://x.com/purestackstudio" target="_blank" rel="noopener" aria-label="PureStack Studio on X"><Icon name="tabler:brand-x"/></a
3234
><a href="#main">Back to top ↑</a></span
3335
>
3436
</Flex>

‎frontend/purestack.studio/guides/extending/plugins.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Besides the prepared `head` and the page's `bodyHtml`, a template receives the p
177177

178178
## Transform Markdown
179179

180-
`markdown` adds [remark](https://github.com/remarkjs/remark) plugins, which change the Markdown tree, and [rehype](https://github.com/rehypejs/rehype) plugins, which change the HTML tree. Every page, header, and footer goes through these steps:
180+
`markdown` adds <a href="https://github.com/remarkjs/remark" target="_blank" rel="noopener">remark</a> plugins, which change the Markdown tree, and <a href="https://github.com/rehypejs/rehype" target="_blank" rel="noopener">rehype</a> plugins, which change the HTML tree. Every page, header, and footer goes through these steps:
181181

182182
1. PureStack reads the Markdown. Regor markup, such as `<Badge tone="success">`, stays raw HTML.
183183
2. Your remark plugins run.
@@ -506,4 +506,4 @@ Every field except `name` is optional.
506506

507507
## A complete example
508508

509-
The PureStack Studio site you are reading uses one plugin for its skin, components, page layout, styles, and generated previews. Read the [Studio plugin](https://github.com/PureStackStudio/PureStack/blob/main/frontend/studioPlugin.ts) and the [config that adds it](https://github.com/PureStackStudio/PureStack/blob/main/frontend/purestack.studio/purestack.config.ts); the CLI builds and serves the site with no other code.
509+
The PureStack Studio site you are reading uses one plugin for its skin, components, page layout, styles, and generated previews. Read the <a href="https://github.com/PureStackStudio/PureStack/blob/main/frontend/studioPlugin.ts" target="_blank" rel="noopener">Studio plugin</a> and the <a href="https://github.com/PureStackStudio/PureStack/blob/main/frontend/purestack.studio/purestack.config.ts" target="_blank" rel="noopener">config that adds it</a>; the CLI builds and serves the site with no other code.

‎frontend/purestack.studio/guides/extending/regor.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ highlights:
1717

1818
# Regor
1919

20-
[Regor](https://github.com/koculu/Regor) is the component framework PureStack is built on. It runs in two places:
20+
<a href="https://github.com/koculu/Regor" target="_blank" rel="noopener">Regor</a> is the component framework PureStack is built on. It runs in two places:
2121

2222
<Grid columns="1" columnsSm="2" class="gap-3 mb-4">
2323
<Panel tone="neutral" bodyClass="p-3">
@@ -55,6 +55,8 @@ A PureStack page can load any browser library, including React or Vue, because P
5555
<Flex wrap="true" align="center">
5656
<BtnLink
5757
href="https://github.com/koculu/Regor"
58+
target="_blank"
59+
rel="noopener"
5860
tone="neutral"
5961
variant="surface"
6062
icon="tabler:brand-github"

0 commit comments

Comments
 (0)