0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-17 23:11:29 -05:00

Seed the Themes in build too

This commit is contained in:
Matthew Phillips 2024-02-14 14:53:26 -05:00
parent ff3816acc8
commit 30783e975f

View file

@ -27,7 +27,7 @@ export default defineConfig({
db: {
studio: true,
collections: { Author, Themes },
async data({ seed, mode }) {
async data({ seed }) {
await seed(Author, [
{ name: 'Ben' },
{ name: 'Nate' },
@ -36,12 +36,11 @@ export default defineConfig({
{ name: 'Sarah' },
]);
// Seed writable collections in dev mode, only
if (mode === 'dev') {
await seed(Themes, [
{ name: 'dracula' },
{ name: 'monokai' },
]);
}
// but in this case we do it for both, due to tests
await seed(Themes, [
{ name: 'dracula' },
{ name: 'monokai' },
]);
},
},
});