Skip to content

Refacto/documentation#28

Open
bioleyl wants to merge 4 commits into
mainfrom
refacto/documentation
Open

Refacto/documentation#28
bioleyl wants to merge 4 commits into
mainfrom
refacto/documentation

Conversation

@bioleyl

@bioleyl bioleyl commented Jun 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Jadis documentation site structure (new guides/API sections + updated VitePress config), adds maintenance scripts for version/dependency management, and updates several dependency versions across workspaces.

Changes:

  • Added scripts/set-version.mjs and scripts/update-deps.mjs, plus root npm scripts to run them.
  • Reorganized docs content into top-level sections (guides/, api/, templating/, state/, dom/, routing/, communication/) and removed the old pages/ tree.
  • Updated versions for docs tooling and some core/template devDependencies (VitePress/Vite/Vitest/Rollup).

Reviewed changes

Copilot reviewed 60 out of 62 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
scripts/update-deps.mjs New script to bump workspace/template devDependencies via npm view.
scripts/set-version.mjs New interactive script to bump versions and update docs CDN references.
packages/docs/templating/to-template.md New toTemplate() documentation page.
packages/docs/templating/slots.md New slots documentation page.
packages/docs/templating/css.md New component styles documentation page.
packages/docs/templating/classes.md New toggleClass() documentation page.
packages/docs/templating/attributes.md New useAttributes() documentation page.
packages/docs/state/use-events.md New useEvents() documentation page.
packages/docs/state/use-change.md New useChange() documentation page.
packages/docs/state/event-handling.md New this.on() event handling documentation page.
packages/docs/routing/routes.md New route declaration documentation page.
packages/docs/routing/route-groups.md New route groups documentation page.
packages/docs/routing/overview.md New routing overview page.
packages/docs/public/logo.svg Added/updated documentation site logo asset.
packages/docs/pages/templating/use-slots.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/use-refs.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/use-change.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/use-attributes.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/toggle-class.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/to-template.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/get-element.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/event-handling.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/create-template.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/templating/add-style.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/routing/using-route-groups.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/routing/declaring-routes.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/routing/configuration.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/helpers/kill-signal.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/helpers/create-element.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/getting-started/first-component.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/examples/index.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/customization/extending-jadis.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/communication/parent-to-child.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/communication/cross-components.md Removed legacy docs page (migrated to new structure).
packages/docs/pages/communication/child-to-parent.md Removed legacy docs page (migrated to new structure).
packages/docs/package.json Updated docs tool dependency (VitePress).
packages/docs/index.md Updated docs homepage hero/feature cards and links for new structure.
packages/docs/guides/templates.md New templates guide.
packages/docs/guides/shadow-dom.md New Shadow DOM guide.
packages/docs/guides/lifecycle.md New lifecycle guide.
packages/docs/guides/installation.md Updated installation guide content and links.
packages/docs/guides/first-component.md New “first component” guide.
packages/docs/guides/extending-jadis.md New customization/extension guide.
packages/docs/guides/examples.md New examples guide page.
packages/docs/dom/use-refs.md New useRefs() documentation page.
packages/docs/dom/kill-signal.md New killSignal documentation page.
packages/docs/dom/get-element.md New getElement() documentation page.
packages/docs/communication/parent-to-child.md New parent→child communication docs.
packages/docs/communication/cross-components.md New cross-component communication docs.
packages/docs/communication/child-to-parent.md New child→parent communication docs.
packages/docs/api/router-class.md New router API reference page.
packages/docs/api/jadis-class.md New Jadis class API reference page.
packages/docs/api/html-css-helpers.md New html()/css() API reference page.
packages/docs/api/create-selector.md New createSelector() API reference page.
packages/docs/api/create-element.md New createElement() API reference page.
packages/docs/api/bus-class.md New Bus API reference page.
packages/docs/.vitepress/config.mts Updated VitePress config (nav/sidebar) for new docs IA.
packages/create/templates/ts/package.json Bumped template devDependency versions (e.g. Vite).
packages/create/templates/js/package.json Bumped template devDependency versions (e.g. Vite).
packages/core/package.json Updated core devDependency versions and formatting.
package.json Added set-version / deps scripts and adjusted script formatting.
Comments suppressed due to low confidence (1)

packages/docs/guides/installation.md:36

  • In this TypeScript snippet, createSelector is imported but not used. Either remove it from the import or use it for selector (which also reinforces the “must contain a hyphen” rule).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/update-deps.mjs
Comment on lines +3 to +19
import { readFileSync, writeFileSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { execSync } from 'node:child_process';

const __dirname = dirname(fileURLToPath(import.meta.url));
const root = join(__dirname, '..');

// --- Fetch latest version via npm view ---
function getLatest(pkgName) {
try {
return execSync(`npm view ${pkgName} version`, { encoding: 'utf8' }).trim();
} catch {
console.warn(` ⚠ Could not fetch latest for ${pkgName}`);
return null;
}
}
Comment thread scripts/set-version.mjs
Comment on lines +84 to +85
const oldPattern = new RegExp(`@jadis/core@${coreVersion}`, 'g');
content = content.replace(oldPattern, `@jadis/core@${newCoreVersion}`);
Comment on lines +10 to +14
import { Jadis, html, createSelector } from '@jadis/core';

class Card extends Jadis {
static selector = createSelector('card');

Comment on lines +40 to +42
<card>
<p>This content is projected into the slot.</p>
</card>
Comment on lines +64 to +68
<card>
<h2 slot="header">My Title</h2>
<p>Main content goes here.</p>
<button slot="footer">Action</button>
</card>
Comment on lines +105 to +106
import { Jadis, html, createSelector } from '@jadis/core';

Comment on lines +22 to +26
import { Jadis, html, createSelector } from '@jadis/core';

class Greeting extends Jadis {
static selector = createSelector('greeting');

Usage:

```html
<greeting name="Alice" title="Developer"></greeting>
Comment on lines +50 to +52
class Greeting extends Jadis {
static readonly selector = 'greeting';
static readonly observedAttributes = ['name'];
Comment on lines +37 to +39
class Counter extends Jadis {
static readonly selector = 'counter';

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants