feat: 增加代码连接技术
This commit is contained in:
parent
ce73f7da60
commit
3ea075091a
|
@ -37,6 +37,13 @@ npm install pnpm -g
|
||||||
pnpm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- 连接代码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm link
|
||||||
|
npm link yunzai
|
||||||
|
```
|
||||||
|
|
||||||
- 启动
|
- 启动
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Koa from 'koa'
|
import Koa from 'koa'
|
||||||
import KoaStatic from 'koa-static'
|
import KoaStatic from 'koa-static'
|
||||||
import Router from 'koa-router'
|
import Router from 'koa-router'
|
||||||
import { Component } from '#miao/utils'
|
import { Component } from 'yunzai/utils'
|
||||||
import { readdirSync } from 'fs'
|
import { readdirSync } from 'fs'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import './tailwindcss.js'
|
import './tailwindcss.js'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { type ComponentCreateOpsionType } from '#miao/utils'
|
import { type ComponentCreateOpsionType } from 'yunzai/utils'
|
||||||
export type RouterType = {
|
export type RouterType = {
|
||||||
url: string
|
url: string
|
||||||
element: React.ReactNode
|
element: React.ReactNode
|
||||||
options: ComponentCreateOpsionType
|
options?: ComponentCreateOpsionType
|
||||||
}[]
|
}[]
|
||||||
|
|
28
package.json
28
package.json
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "miao-yunzai",
|
"name": "yunzai",
|
||||||
"version": "4.0.0-rc.0",
|
"version": "4.0.0-rc.0",
|
||||||
"author": "Yoimiya-Kokomi, Le-niao",
|
"author": "Yoimiya-Kokomi, Le-niao",
|
||||||
"description": "QQ Group Bot",
|
"description": "QQ Group Bot",
|
||||||
|
@ -78,13 +78,27 @@
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4"
|
||||||
},
|
},
|
||||||
|
"exports": {
|
||||||
|
"./config": {
|
||||||
|
"import": "./src/config/index.js"
|
||||||
|
},
|
||||||
|
"./db": {
|
||||||
|
"import": "./src/db/index.js"
|
||||||
|
},
|
||||||
|
"./mys": {
|
||||||
|
"import": "./src/mys/index.js"
|
||||||
|
},
|
||||||
|
"./utils": {
|
||||||
|
"import": "./src/utils/index.js"
|
||||||
|
},
|
||||||
|
"./core": {
|
||||||
|
"import": "./src/core/index.js"
|
||||||
|
},
|
||||||
|
"./image/types": {
|
||||||
|
"import": "./image/types.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
"#image/*": "./image/*",
|
|
||||||
"#yunzai/config": "./src/config/index.js",
|
|
||||||
"#yunzai/core": "./src/core/index.js",
|
|
||||||
"#yunzai/db": "./src/db/index.js",
|
|
||||||
"#yunzai/mys": "./src/mys/index.js",
|
|
||||||
"#yunzai/utils": "./src/utils/index.js",
|
|
||||||
"#miao": "./plugins/miao-plugin/components/index.js",
|
"#miao": "./plugins/miao-plugin/components/index.js",
|
||||||
"#miao.models": "./plugins/miao-plugin/models/index.js"
|
"#miao.models": "./plugins/miao-plugin/models/index.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,12 @@
|
||||||
//
|
//
|
||||||
"paths": {
|
"paths": {
|
||||||
// 内部核心模块导出
|
// 内部核心模块导出
|
||||||
"#image/*": ["./image/*"],
|
"yunzai/image/types": ["./image/types.js"],
|
||||||
"#yunzai/*": ["./src/*"],
|
"yunzai/config": ["./src/config/index.js"],
|
||||||
|
"yunzai/db": ["./src/db/index.js"],
|
||||||
|
"yunzai/mys": ["./src/mys/index.js"],
|
||||||
|
"yunzai/utils": ["./src/utils/index.js"],
|
||||||
|
"yunzai/core": ["./src/core/index.js"],
|
||||||
// 外部模块 待移除
|
// 外部模块 待移除
|
||||||
"#miao": ["./plugins/miao-plugin/components/index.js"],
|
"#miao": ["./plugins/miao-plugin/components/index.js"],
|
||||||
"#miao.models": ["./plugins/miao-plugin/models/index.js"]
|
"#miao.models": ["./plugins/miao-plugin/models/index.js"]
|
||||||
|
@ -46,5 +50,5 @@
|
||||||
"transpileOnly": true,
|
"transpileOnly": true,
|
||||||
"experimentalSpecifierResolution": "node"
|
"experimentalSpecifierResolution": "node"
|
||||||
},
|
},
|
||||||
"include": ["src", "image", "plugins", "plugins/system-plugin"]
|
"include": ["src", "image", "plugins"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue