|
1 | | -import { readdirSync } from 'node:fs'; |
2 | | -import { resolve } from 'node:path'; |
| 1 | +import { readdirSync } from "node:fs"; |
| 2 | +import { resolve } from "node:path"; |
3 | 3 |
|
4 | | -import { readJSON } from './utils'; |
| 4 | +import { readJSONSync } from "fs-extra"; |
5 | 5 |
|
6 | | -export const root = resolve(__dirname, '..'); |
| 6 | +export const root = resolve(__dirname, ".."); |
7 | 7 |
|
8 | | -export const pluginsDir = resolve(root, './src'); |
9 | | -export const localesDir = resolve(root, './locales'); |
10 | | -export const publicDir = resolve(root, 'public'); |
| 8 | +export const pluginsDir = resolve(root, "./src"); |
| 9 | +export const localesDir = resolve(root, "./locales"); |
| 10 | +export const publicDir = resolve(root, "public"); |
11 | 11 |
|
12 | 12 | export const plugins = readdirSync(pluginsDir, { withFileTypes: true }); |
13 | 13 | export const pluginLocales = readdirSync(localesDir, { withFileTypes: true }); |
14 | 14 |
|
15 | | -export const templatePath = resolve(root, 'plugin-template.json'); |
| 15 | +export const templatePath = resolve(root, "plugin-template.json"); |
16 | 16 |
|
17 | | -export const indexPath = resolve(publicDir, 'index.json'); |
18 | | -export const indexCnPath = resolve(publicDir, 'index.zh-CN.json'); |
| 17 | +export const indexPath = resolve(publicDir, "index.json"); |
| 18 | +export const indexCnPath = resolve(publicDir, "index.zh-CN.json"); |
19 | 19 |
|
20 | | -export const readmePath = resolve(root, 'README.md'); |
21 | | -export const readmeCnPath = resolve(root, 'README.zh-CN.md'); |
| 20 | +export const readmePath = resolve(root, "README.md"); |
| 21 | +export const readmeCnPath = resolve(root, "README.zh-CN.md"); |
22 | 22 |
|
23 | | -export const metaPath = resolve(root, 'meta.json'); |
24 | | -export const meta = readJSON(metaPath); |
| 23 | +export const metaPath = resolve(root, "meta.json"); |
| 24 | +export const meta = readJSONSync(metaPath); |
25 | 25 |
|
26 | | -export const readmeSplit = '<!-- AWESOME PLUGINS -->'; |
| 26 | +export const readmeSplit = "<!-- AWESOME PLUGINS -->"; |
27 | 27 |
|
28 | | -export const SYNC_URL = 'https://openai-collections.chat-plugin.lobehub.com'; |
| 28 | +export const SYNC_URL = "https://openai-collections.chat-plugin.lobehub.com"; |
29 | 29 |
|
30 | 30 | export const category = [ |
31 | | - 'gaming-entertainment', |
32 | | - 'lifestyle', |
33 | | - 'media-generate', |
34 | | - 'science-education', |
35 | | - 'social', |
36 | | - 'stocks-finance', |
37 | | - 'tools', |
38 | | - 'web-search', |
| 31 | + "gaming-entertainment", |
| 32 | + "lifestyle", |
| 33 | + "media-generate", |
| 34 | + "science-education", |
| 35 | + "social", |
| 36 | + "stocks-finance", |
| 37 | + "tools", |
| 38 | + "web-search", |
39 | 39 | ]; |
40 | 40 |
|
41 | | -export const config = require('../.i18nrc.js'); |
| 41 | +export const config = require("../.i18nrc.js"); |
0 commit comments