chore: fix lint & type

This commit is contained in:
YunYouJun
2022-08-08 01:56:04 +08:00
parent eb06ad91a7
commit b8a4ee2c0b
2 changed files with 6 additions and 3 deletions

View File

@@ -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')

View File

@@ -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))
},
)