mirror of
https://github.com/lifegpc/bookdownload.git
synced 2026-07-08 01:31:31 +08:00
Add support to save chapter to db automaicly
This commit is contained in:
7
build.js
7
build.js
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user