chore: fix lint & type
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// convert csv to json
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import url from 'url'
|
||||
import consola from 'consola'
|
||||
import url from "url";
|
||||
import type { Recipe, RecipeItem } from '~/types'
|
||||
import { generateEmojisFromStuff } from '~/utils'
|
||||
|
||||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
|
||||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
||||
const recipeCsvFile = path.resolve(__dirname, '../src/data/recipe.csv')
|
||||
const recipeJsonFile = path.resolve(__dirname, '../src/data/recipe.json')
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import './styles/css-vars.scss'
|
||||
import './styles/index.scss'
|
||||
import 'uno.css'
|
||||
|
||||
import type { UserModule } from '~/types'
|
||||
|
||||
const routes = setupLayouts(generatedRoutes)
|
||||
|
||||
// https://github.com/antfu/vite-ssg
|
||||
@@ -16,6 +18,7 @@ export const createApp = ViteSSG(
|
||||
{ routes, base: import.meta.env.BASE_URL },
|
||||
(ctx) => {
|
||||
// install all modules under `modules/`
|
||||
Object.values(import.meta.globEager('./modules/*.ts')).forEach(i => i.install?.(ctx))
|
||||
Object.values(import.meta.glob<{ install: UserModule }>('./modules/*.ts', { eager: true }))
|
||||
.forEach(i => i.install?.(ctx))
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user