refactor: migrate to nuxt

This commit is contained in:
YunYouJun
2023-07-30 03:08:42 +08:00
parent c23f39e8c0
commit 0dfec1831b
90 changed files with 7864 additions and 3962 deletions

View File

@@ -3,11 +3,11 @@ import fs from 'node:fs'
import path from 'node:path'
import url from 'node:url'
import consola from 'consola'
import type { Recipe, RecipeItem } from '~/types'
import type { Recipe, RecipeItem } from '../types'
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')
const recipeCsvFile = path.resolve(__dirname, '../data/recipe.csv')
const recipeJsonFile = path.resolve(__dirname, '../data/recipe.json')
function run() {
const csvData = fs.readFileSync(recipeCsvFile, 'utf-8')