Bootstrap the Dashward repo per arch/UBUNTU-DASHBOARD-SPACE.md: - pnpm-workspaces monorepo (sdk, extension, container, widgets-builtin/*) - GNOME extension stub (metadata.json, src/*.ts placeholders for warden, guard, supervisor, entry UX, DBus service) - WebKit container stub (GJS main + page-side runtime + dashboard.html) - TypeScript widget SDK (defineWidget + types) - Builtin clock widget as the first SDK consumer example - DBus interface XML (proto/shell.iface.xml) and shared types - esbuild configs for extension and container; tsc for SDK - Design doc copied in at repo root for discoverability No functional logic yet -- all components are placeholders that compose in extension.ts so the build chain can be exercised. P1 (workspace warden) starts next. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
793 B
JavaScript
35 lines
793 B
JavaScript
import esbuild from 'esbuild';
|
|
|
|
const watch = process.argv.includes('--watch');
|
|
|
|
const gjsOpts = {
|
|
entryPoints: ['src/main.ts'],
|
|
bundle: true,
|
|
outfile: 'dist/main.js',
|
|
format: 'esm',
|
|
target: 'firefox128',
|
|
platform: 'neutral',
|
|
external: ['gi://*', 'system', 'cairo', 'gettext'],
|
|
sourcemap: 'inline',
|
|
logLevel: 'info',
|
|
};
|
|
|
|
const runtimeOpts = {
|
|
entryPoints: ['runtime/runtime.ts'],
|
|
bundle: true,
|
|
outfile: 'dist/runtime.js',
|
|
format: 'esm',
|
|
target: 'es2022',
|
|
platform: 'browser',
|
|
sourcemap: 'inline',
|
|
logLevel: 'info',
|
|
};
|
|
|
|
if (watch) {
|
|
const c1 = await esbuild.context(gjsOpts);
|
|
const c2 = await esbuild.context(runtimeOpts);
|
|
await Promise.all([c1.watch(), c2.watch()]);
|
|
} else {
|
|
await Promise.all([esbuild.build(gjsOpts), esbuild.build(runtimeOpts)]);
|
|
}
|