* convert all theme files to json * automatically discover extra themes in go backend * use zod * error tidy up * error tidy up p2 * generate theme json schema from zod * generate theme list at build time, don't do it at runtime * make name and id required in the theme schema
23 lines
610 B
TypeScript
23 lines
610 B
TypeScript
import json from '@rollup/plugin-json';
|
|
import { createRequire } from 'node:module';
|
|
|
|
import { entryPoint, plugins, esmOutput, cjsOutput } from '../rollup.config.parts';
|
|
|
|
const rq = createRequire(import.meta.url);
|
|
const pkg = rq('./package.json');
|
|
|
|
export default [
|
|
{
|
|
input: entryPoint,
|
|
plugins: [...plugins, json()],
|
|
output: [cjsOutput(pkg, 'grafana-data'), esmOutput(pkg, 'grafana-data')],
|
|
treeshake: false,
|
|
},
|
|
{
|
|
input: 'src/unstable.ts',
|
|
plugins: [...plugins, json()],
|
|
output: [cjsOutput(pkg, 'grafana-data'), esmOutput(pkg, 'grafana-data')],
|
|
treeshake: false,
|
|
},
|
|
];
|