Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions playgrounds/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@
"dev": "DEBUG='vite:devtools:*' VITE_DEVTOOLS_LOCAL_DEV=true vite",
"dev:standalone": "DEBUG='vite:devtools:*' VITE_DEVTOOLS_LOCAL_DEV=true tsx ../../packages/core/src/node/cli.ts",
"build": "vite build && vite-devtools"
},
"dependencies": {
"@devframes/plugin-a11y": "catalog:deps",
"@devframes/plugin-code-server": "catalog:deps",
"@devframes/plugin-data-inspector": "catalog:deps",
"@devframes/plugin-git": "catalog:deps",
"@devframes/plugin-og": "catalog:deps"
}
}
45 changes: 43 additions & 2 deletions playgrounds/core/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { a11yAgentBundlePath, createA11yDevframe } from '@devframes/plugin-a11y'
import { createCodeServerDevframe } from '@devframes/plugin-code-server'
import { createDataInspectorDevframe } from '@devframes/plugin-data-inspector'
import { createGitDevframe } from '@devframes/plugin-git'
import { createInspectDevframe } from '@devframes/plugin-inspect'
import { createMessagesDevframe } from '@devframes/plugin-messages'
import { createOgDevframe } from '@devframes/plugin-og'
import { createTerminalsDevframe } from '@devframes/plugin-terminals'
import { createPluginFromDevframe, createSimpleClientScript } from '@vitejs/devtools-kit/node'
import Vue from '@vitejs/plugin-vue'
import { normalize } from 'pathe'
import UnoCSS from 'unocss/vite'
import { defineConfig } from 'vite'
import Tracer from 'vite-plugin-vue-tracer'
import VueRouter from 'vue-router/vite'
import { alias } from '../../alias'
import { A11yCheckerPlugin } from '../../examples/plugin-a11y-checker/src/node'
import { GitUIPlugin } from '../../examples/plugin-git-ui/src/node'
import { DevTools } from '../../packages/core/src'
import { buildCSS } from '../../packages/core/src/client/webcomponents/scripts/build-css'
Expand All @@ -27,6 +33,11 @@ declare module '@vitejs/devtools-kit' {
}
}

// The monorepo root, two levels up from this playground — used so
// @devframes/plugin-git dogfoods against this actual checkout rather than
// whatever `cwd` the playground's dev server happens to run from.
const monorepoRoot = fileURLToPath(new URL('../..', import.meta.url))

// https://vite.dev/config/
export default defineConfig({
define: {
Expand Down Expand Up @@ -84,8 +95,38 @@ export default defineConfig({
Tracer({
viteDevtools: true,
}),
A11yCheckerPlugin(),
// Kit-pattern json-render demo — see docs/kit/examples.md.
GitUIPlugin(),

// Official @devframes/plugin-* dashboards.
createPluginFromDevframe(createA11yDevframe(), {
dock: {
category: 'web',
// The panel scans the host page itself, so it needs its agent
// injected as a client script — see the `@devframes/plugin-a11y`
// README's "How it works" section.
clientScript: { importFrom: `/@fs/${normalize(a11yAgentBundlePath)}` },
},
}),
createPluginFromDevframe(createGitDevframe({
// Dogfoods against this actual monorepo checkout.
repoRoot: monorepoRoot,
// Playground only — enables staging/unstaging/committing from the UI
// against this real checkout. Do not enable write mode for a
// production DevTools mount.
write: true,
}), {
dock: { category: 'app' },
}),
createPluginFromDevframe(createOgDevframe(), {
dock: { category: 'web' },
}),
createPluginFromDevframe(createDataInspectorDevframe(), {
dock: { category: 'advanced' },
}),
createPluginFromDevframe(createCodeServerDevframe(), {
dock: { category: 'advanced' },
}),
{
name: 'local',
devtools: {
Expand Down
Loading
Loading