Skip to content

Commit e57ac2e

Browse files
committed
update engine scaffolding with multi type implementation
1 parent 7d6e33c commit e57ac2e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/generators/engine.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { scaffoldDir, authorJsonTpl, readmeTpl } from "../utils/files.ts"
2-
import type { GeneratorCtx } from "../types/index.ts"
1+
import { scaffoldDir, authorJsonTpl, readmeTpl } from "../utils/files.ts";
2+
import type { GeneratorCtx } from "../types/index.ts";
33

44
const indexTpl = (name: string) => `export const name = "${name}"
5-
export const type = "web" // web | images | videos | news | custom
5+
export const type = "web" // string or array - e.g. "web", "books", ["web", "any-type"]
66
export const bangShortcut = "${name}"
77
88
// settingsSchema example:
@@ -56,11 +56,11 @@ export const executeSearch = async (
5656
return []
5757
}
5858
}
59-
`
59+
`;
6060

6161
export const generateEngine = async (ctx: GeneratorCtx) =>
6262
scaffoldDir(ctx.outDir, ctx.name, {
6363
"index.ts": indexTpl(ctx.name),
6464
"README.md": readmeTpl(ctx.name, "A custom search engine for degoog."),
6565
"author.json": authorJsonTpl(ctx.config),
66-
})
66+
});

0 commit comments

Comments
 (0)