pubinfo 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +42 -0
  2. package/package.json +6 -6
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # pubinfo
2
+
3
+ Pubinfo 对外发布的聚合入口包。它把运行时、构建配置、主题和规范配置收敛成一套更易消费的 API。
4
+
5
+ ## 它在做什么
6
+
7
+ - 默认导出 `@pubinfo/core` 的运行时能力
8
+ - 自动引入 `@pubinfo/core/style.css`
9
+ - 通过子路径继续暴露 Vite / UnoCSS / ESLint / Stylelint / 主题能力
10
+ - 提供统一的 `pubinfo` 可执行命令
11
+
12
+ ## 安装
13
+
14
+ ```bash
15
+ pnpm add pubinfo
16
+ ```
17
+
18
+ ## 基本用法
19
+
20
+ ```ts
21
+ import { createPubinfo } from 'pubinfo';
22
+ ```
23
+
24
+ ```ts
25
+ import { definePubinfoConfig } from 'pubinfo/node';
26
+ import presetUnocss from 'pubinfo/unocss';
27
+ import eslint from 'pubinfo/eslint';
28
+ import stylelint from 'pubinfo/stylelint';
29
+ ```
30
+
31
+ ## 导出结构
32
+
33
+ - `pubinfo`: `@pubinfo/core` + `@pubinfo/core/runtime`
34
+ - `pubinfo/node`: `@pubinfo/vite` 和 UnoCSS 相关节点侧能力
35
+ - `pubinfo/client`: 主题工具
36
+ - `pubinfo/unocss`: `presetUnocss`
37
+ - `pubinfo/eslint`: ESLint 配置
38
+ - `pubinfo/stylelint`: Stylelint 配置
39
+
40
+ ## 适用场景
41
+
42
+ 这是业务项目最应该依赖的包。除非你明确要拆开使用内部能力,否则优先从这里导入,而不是分别安装 `@pubinfo/core`、`@pubinfo/vite`、`@pubinfo/config`。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pubinfo",
3
3
  "type": "module",
4
- "version": "2.2.0",
4
+ "version": "2.2.2",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.mts",
@@ -53,11 +53,11 @@
53
53
  "unocss": "^66.6.0",
54
54
  "vue": "^3.5.28",
55
55
  "vue-router": "^5.0.2",
56
- "@pubinfo/cli": "2.2.0",
57
- "@pubinfo/config": "2.2.0",
58
- "@pubinfo/core": "2.2.0",
59
- "@pubinfo/devtools": "2.2.0",
60
- "@pubinfo/vite": "2.2.0"
56
+ "@pubinfo/cli": "2.2.2",
57
+ "@pubinfo/core": "2.2.2",
58
+ "@pubinfo/devtools": "2.2.2",
59
+ "@pubinfo/config": "2.2.2",
60
+ "@pubinfo/vite": "2.2.2"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@iconify/json": "^2.2.437"