Skip to content

Commit b8ebb85

Browse files
committed
refactor(plugin-a11y): restructure to app/ + src/{node,client-script} + playgrounds/
Establish the canonical built-in plugin layout on a11y: - app/ holds the framework SPA (was src/spa), built by Vite into the --assets package - src/node/ holds all node-side code (definition, setup, cli, rpc) - src/client-script/ holds both browser scripts (client runtime + page script), built by tsdown - playgrounds/ holds the same-origin playground host (was demo/) - dev serves the panel under its base path with HMR + a live node-side bridge - play builds then boots the playground against the built plugin - rename the ./client export subpath to ./client-script
1 parent aad1fce commit b8ebb85

70 files changed

Lines changed: 335 additions & 310 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎alias.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ export const alias = {
117117
'@devframes/plugin-og/cli': p('og/src/cli.ts'),
118118
'@devframes/plugin-og/vite': p('og/src/vite.ts'),
119119
'@devframes/plugin-og': p('og/src/index.ts'),
120-
'@devframes/plugin-a11y/client': p('a11y/src/client/index.ts'),
121-
'@devframes/plugin-a11y/node': p('a11y/src/node/index.ts'),
122-
'@devframes/plugin-a11y/cli': p('a11y/src/cli.ts'),
123-
'@devframes/plugin-a11y/vite': p('a11y/src/vite.ts'),
124-
'@devframes/plugin-a11y': p('a11y/src/index.ts'),
120+
'@devframes/plugin-a11y/client-script/page-script': p('a11y/src/client-script/page-script/index.ts'),
121+
'@devframes/plugin-a11y/client-script': p('a11y/src/client-script/client/index.ts'),
122+
'@devframes/plugin-a11y/node': p('a11y/src/node/setup.ts'),
123+
'@devframes/plugin-a11y/cli': p('a11y/src/node/cli.ts'),
124+
'@devframes/plugin-a11y': p('a11y/src/node/index.ts'),
125125
'@devframes/plugin-messages/client': p('messages/src/client/index.ts'),
126126
'@devframes/plugin-messages/node': p('messages/src/node/index.ts'),
127127
'@devframes/plugin-messages/constants': p('messages/src/constants.ts'),

‎knip.jsonc‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,12 @@
269269
// `plugins/*` glob's `entry` above, so repeat that pattern here
270270
// alongside the stories.
271271
"entry": [
272-
"src/{index,cli,vite,constants,types}.ts",
273-
"src/{client,node,rpc,inject,engine,registry}/index.ts",
274-
"src/**/*.stories.tsx"
272+
"src/node/{index,setup,cli}.ts",
273+
"src/node/rpc/index.ts",
274+
"src/client-script/{client,page-script}/index.ts",
275+
"app/**/*.stories.tsx"
275276
],
276-
"ignoreDependencies": ["@devframes/plugin-a11y--assets"]
277+
"ignoreDependencies": ["@devframes/plugin-a11y--assets", "@devframes/vite"]
277278
},
278279
"plugins/git": {
279280
// The React client build's root sits at `src/client` (`next dev

‎plugins/a11y/.storybook/main.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { mergeConfig } from 'vite'
44
import { alias } from '../../../alias'
55

66
const config: StorybookConfig = {
7-
stories: ['../src/**/*.stories.@(ts|tsx)'],
7+
stories: ['../{src,app}/**/*.stories.@(ts|tsx)'],
88
framework: {
99
name: 'storybook-solidjs-vite',
1010
options: {},

‎plugins/a11y/.storybook/preview.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Preview } from 'storybook-solidjs-vite'
22
import 'virtual:uno.css'
33
import '@antfu/design/styles.css'
4-
import '../src/spa/styles.css'
4+
import '../app/styles.css'
55

66
// Drive the shared `@antfu/design` tokens off the toolbar theme toggle: dark mode
77
// is the `.dark` class on `<html>`, and the canvas takes the semantic
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { Impact, PinTarget, Violation, ViolationNode } from '../shared/protocol.ts'
1+
import type { Impact, PinTarget, Violation, ViolationNode } from '../src/shared/protocol.ts'
22
import type { SelectedItem } from './lib/fix-prompt.ts'
33
import type { RouteGroupModel, SelectionApi } from './lib/violation-view.ts'
44
import { batch, createEffect, createMemo, createSignal, Match, on, Show, Switch } from 'solid-js'
5-
import { emptyCounts } from '../shared/protocol.ts'
5+
import { emptyCounts } from '../src/shared/protocol.ts'
66
import { EmptyState } from './components/EmptyState.tsx'
77
import { FixPromptsDialog } from './components/FixPromptsDialog.tsx'
88
import { Header } from './components/Header.tsx'
File renamed without changes.
File renamed without changes.

plugins/a11y/src/spa/components/FixPromptsDialog.stories.tsx renamed to plugins/a11y/app/components/FixPromptsDialog.stories.tsx

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)