Minor cleanups

This commit is contained in:
Sidharth Vinod 2024-05-21 22:24:04 +05:30
parent ca2c112c9a
commit aa63f320f8
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
5 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,7 @@
import jison from 'jison';
export const transformJison = (src: string): string => {
// @ts-ignore - Jison is not typed properly
const parser = new jison.Generator(src, {
moduleType: 'js',
'token-stack': true,

View File

@ -7,8 +7,8 @@ import { MermaidBuildOptions, defaultOptions, getBuildConfig } from './util.js';
const shouldVisualize = process.argv.includes('--visualize');
const buildPackage = async (entryName: keyof typeof packageOptions) => {
const commonOptions = { ...defaultOptions, entryName } as const;
const buildConfigs = [
const commonOptions: MermaidBuildOptions = { ...defaultOptions, entryName } as const;
const buildConfigs: MermaidBuildOptions[] = [
// package.mjs
{ ...commonOptions },
// package.min.mjs

View File

@ -8,7 +8,7 @@ import { jisonPlugin } from './jisonPlugin.js';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
export interface MermaidBuildOptions {
export interface MermaidBuildOptions extends BuildOptions {
minify: boolean;
core: boolean;
metafile: boolean;

View File

@ -8,7 +8,6 @@
"paths": {
"$root/*": ["src/*"]
}
},
"include": ["./src/**/*.ts", "./package.json"],
"include": ["./src/**/*.ts", "./package.json"]
}

View File

@ -15,7 +15,6 @@ export default defineConfig({
plugins: [
jison(),
jsonSchemaPlugin(), // handles .schema.yaml JSON Schema files
// @ts-expect-error According to the type definitions, rollup plugins are incompatible with vite
typescript({ compilerOptions: { declaration: false } }),
],
test: {