Unify Wiki and Studio and remove deployment scaffolding
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
// Execute only on the authorized ces-control runner. Source exports work without a local build.
|
||||
import { mkdir, writeFile, copyFile } from 'node:fs/promises';
|
||||
import { themes, palette } from '../src/tokens.mjs';
|
||||
const root = new URL('../', import.meta.url);
|
||||
await mkdir(new URL('dist/', root), { recursive: true });
|
||||
for (const name of ['themes.css', 'tailwind.css']) await copyFile(new URL(`src/${name}`, root), new URL(`dist/${name}`, root));
|
||||
await writeFile(new URL('dist/tokens.json', root), JSON.stringify({ palette, themes }, null, 2) + '\n');
|
||||
console.log('Brand CSS and resolved JSON exported to dist/.');
|
||||
@@ -1,8 +1,8 @@
|
||||
// Run in the confirmed remote CI build (or an explicitly authorized dev environment).
|
||||
// Run in the confirmed remote build (or an explicitly authorized dev environment).
|
||||
import { copyFile, mkdir, readFile } from 'node:fs/promises';
|
||||
import { resolve } from 'node:path';
|
||||
const app = JSON.parse(await readFile('package.json', 'utf8'));
|
||||
if (!['@prompt/studio', '@prompt/waterfall-wiki'].includes(app.name)) throw Error('Run from a consuming application directory');
|
||||
if (app.name !== '@prompt/waterfall-wiki') throw Error('Run from a consuming application directory');
|
||||
const source = new URL('../assets/', import.meta.url);
|
||||
await mkdir(resolve('public/brand'), {recursive:true});
|
||||
for (const name of ['logo-light.svg','logo-dark.svg','icon-dark.svg']) await copyFile(new URL(`svg/${name}`, source), resolve(`public/brand/${name}`));
|
||||
|
||||
Reference in New Issue
Block a user