spec: import asset as txt file, for bundlers

This commit is contained in:
2025-01-04 18:33:11 +08:00
parent ab8e6b57f9
commit abb60fe3cb
3 changed files with 6 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import { Readable, Writable } from 'stream';
import { createInterface } from 'readline';
import { projectRoot } from '../environment/index.js';
import { SPECBenchData, benchpath, exepath, buildpath } from './benchData.js';
import specTemplate from '../../assets/specTemplate.cfg';
@@ -56,8 +57,6 @@ export function mkBench(spec: SPEC, bench: SPECBenchData): Bench {
};
}
const specTemplate = fs.readFileSync(path.resolve(projectRoot, "assets", "specTemplate.cfg")).toString("utf-8");
const writeFile = promisify(fs.writeFile);
export interface ConfigOptions {