Add support to save chapter to db automaicly

This commit is contained in:
2026-02-15 16:54:31 +08:00
parent e355432436
commit e91ae58813
8 changed files with 103 additions and 11 deletions

View File

@@ -57,11 +57,14 @@ async function build(name, is_content_script = true) {
return result;
}
async function buildTsx(names) {
async function buildTsx(names, tsnames) {
const entryPoints = [];
for (const name of names) {
entryPoints.push(`src/${name}.tsx`);
}
for (const name of tsnames) {
entryPoints.push(`src/${name}.ts`);
}
const result = await esbuild.build({
entryPoints: entryPoints,
bundle: true,
@@ -88,4 +91,4 @@ async function buildTsx(names) {
fs.rmSync('dist', { recursive: true, force: true });
fs.mkdirSync('dist', { recursive: true });
await build('qdchapter');
await buildTsx(['popup', 'settings']);
await buildTsx(['popup', 'settings'], ['background']);