* feat: 添加食物相克检测功能及相关数据支持 * chore: 修改 .gitignore 设置,并删除 recipe.json 的 git 引用 * style: 格式化 incompatible-foods.ts 文件中的代码,修改缩紧为 2 * fix: 修复导入语句,确保正确使用 Vue 的 ref 和 computed * refactor: 优化相克检测逻辑,使用 Set 提高性能 * refactor: 移除不必要的 IncompatibleRule 类型定义 * fix: 添加缺失字段检查,确保不完整数据不会被处理 * style: 使用 eslint 优化代码格式
16 lines
581 B
TypeScript
16 lines
581 B
TypeScript
import path from 'node:path'
|
|
import url from 'node:url'
|
|
|
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
|
const recipeCsvFile = path.resolve(__dirname, '../app/data/recipe.csv')
|
|
const recipeJsonFile = path.resolve(__dirname, '../app/data/recipe.json')
|
|
const incompatibleFoodsCsvFile = path.resolve(__dirname, '../app/data/incompatible-foods.csv')
|
|
const incompatibleFoodsJsonFile = path.resolve(__dirname, '../app/data/incompatible-foods.json')
|
|
|
|
export const config = {
|
|
recipeCsvFile,
|
|
recipeJsonFile,
|
|
incompatibleFoodsCsvFile,
|
|
incompatibleFoodsJsonFile,
|
|
}
|