@varlet/cli 3.15.0-alpha.1776609013808 → 3.15.1

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.
package/README.md CHANGED
@@ -22,19 +22,17 @@ The out-of-the-box `Vue3 component library` rapid prototyping tool provides a se
22
22
 
23
23
  ### Recommended toolchain
24
24
 
25
- Under Varlet’s current `component-library toolchain`, we recommend combining `@varlet/cli`, [`vite-plus`](https://viteplus.dev/) (`vp`), and `rattail` (`rt`, npm package `rattail`): `@varlet/cli` covers first-party library workflows (docs, compile, tests, …), `vp` covers lint/format and app/extension build entrypoints aligned with the Ox/Rolldown stack, and `rt` covers `clean`, git hooks, `changelog`, `release`, `commit-lint`, and similar automation. Use this trio for new libraries, scaffold upgrades, or whenever you re-run `varlet-cli gen` to match the built-in template.
25
+ Under Varlet’s current `component-library toolchain`, we recommend combining `@varlet/cli`, [`vite-plus`](https://viteplus.dev/) (`vp`), and [`rattail`](https://rattail.varletjs.org/) (`rt`): `@varlet/cli` covers first-party library workflows (docs, compile, tests, …), `vp` covers lint/format and app/extension build entrypoints aligned with the Oxc/Rolldown stack, and `rattail` covers `clean`, git hooks, `changelog`, `release`, `commit-lint`, and similar automation. Use this trio for new libraries and scaffold upgrades.
26
26
 
27
27
  | Piece | Role |
28
28
  | --- | --- |
29
29
  | `@varlet/cli` | First-party Varlet workflows: `create`, `gen`, `dev`, `build`, `preview`, `compile`, `compile:style-vars`, `build:icons`, `test`, … |
30
- | [`vite-plus`](https://viteplus.dev/) (`vp`) | Lint, format, app/extension `build`/`dev`/`preview`, and other toolchain entrypoints aligned with the Ox/Rolldown stack |
31
- | `rattail` (`rt`, npm package `rattail`) | `clean`, git hooks, `changelog`, `release`, `commit-lint`, and other repo automation |
30
+ | [`vite-plus`](https://viteplus.dev/) (`vp`) | Lint, format, app/extension `build`/`dev`/`preview`, and other toolchain entrypoints aligned with the Oxc/Rolldown stack |
31
+ | [`rattail`](https://rattail.varletjs.org/) (`rt`) | `clean`, git hooks, `changelog`, `release`, `commit-lint`, and other repo automation |
32
32
 
33
- After upgrading `@varlet/cli`, you can align an existing app with the built-in template by running `varlet-cli gen` again from the parent directory (commit or back up first; `gen` may overwrite generated files).
33
+ ### Commands pending deprecation
34
34
 
35
- ### Legacy subcommands (prefer alternatives)
36
-
37
- These subcommands still run for backward compatibility and may print a deprecation notice. Do not rely on them in new scripts or new projects — prefer `vp` / `rt` (or `vr` where documented). Any future changes will be called out in release notes.
35
+ These commands still run for backward compatibility and may print a deprecation notice. Do not rely on them in new scripts or new projects — prefer `vp` / `rt` (or `vr` where documented). Any future changes will be called out in release notes.
38
36
 
39
37
  | Command | Use instead |
40
38
  | --- | --- |
@@ -45,7 +43,7 @@ These subcommands still run for backward compatibility and may print a deprecati
45
43
  | `varlet-cli commit-lint` | `rt commit-lint` |
46
44
  | `varlet-cli checklist` | Minimal value; deprecated without replacement |
47
45
  | `varlet-cli changelog` | `rt changelog` |
48
- | `varlet-cli release` | `rt release` (or `vr release` from `@varlet/release`) |
46
+ | `varlet-cli release` | `rt release` |
49
47
 
50
48
  ### Quickstart
51
49
 
package/README.zh-CN.md CHANGED
@@ -22,19 +22,17 @@
22
22
 
23
23
  ### 推荐技术栈
24
24
 
25
- 在全新的 `Varlet 组件库工具链` 体系下,我们建议将 `@varlet/cli`、[`vite-plus`](https://viteplus.dev/)(`vp`)与 `rattail`(`rt`,npm 包 `rattail`)组合使用:前者覆盖组件库文档站与编译等一等能力,后两者承接与 Ox / Rolldown 栈一致的 lint、format、打包入口,以及 `clean`、Git 钩子、`changelog`、`release`、`commit-lint` 等工程自动化。无论是从零搭建新库,还是升级旧脚手架、需要与模板对齐时,都推荐沿用这一组合。
25
+ 在全新的 `Varlet 组件库工具链` 体系下,我们建议将 `@varlet/cli`、[`vite-plus`](https://viteplus.dev/)(`vp`)与 [`rattail`](https://rattail.varletjs.org/)(`rt`)组合使用:前者覆盖组件库文档站与编译等一等能力,后两者承接与 Oxc / Rolldown 栈一致的 lint、format、打包入口,以及 `clean`、git hooks、`changelog`、`release`、`commit-lint` 等工程自动化。无论是从零搭建新库,还是升级旧脚手架、需要与模板对齐时,都推荐沿用这一组合。
26
26
 
27
27
  | 部分 | 作用 |
28
28
  | --- | --- |
29
29
  | `@varlet/cli` | Varlet 一等能力:`create`、`gen`、`dev`、`build`、`preview`、`compile`、`compile:style-vars`、`build:icons`、`test` 等 |
30
- | [`vite-plus`](https://viteplus.dev/)(`vp`) | 与 Ox / Rolldown 栈一致的 lint、format、应用/扩展的 `build`/`dev`/`preview` 等入口 |
31
- | `rattail`(`rt`,npm 包 `rattail`) | `clean`、Git 钩子、`changelog`、`release`、`commit-lint` 等工程自动化 |
30
+ | [`vite-plus`](https://viteplus.dev/)(`vp`) | 与 Oxc / Rolldown 栈一致的 lint、format、应用/扩展的 `build`/`dev`/`preview` 等入口 |
31
+ | [`rattail`](https://rattail.varletjs.org/)(`rt`) | `clean`、git hooks、`changelog`、`release`、`commit-lint` 等工程自动化 |
32
32
 
33
- 升级 `@varlet/cli` 后,可在上级目录再次执行 `varlet-cli gen`,将已有工程与内置模板对齐(请先提交或备份;`gen` 可能覆盖生成型文件)。
33
+ ### 以下命令即将废弃
34
34
 
35
- ### 不建议继续使用的子命令
36
-
37
- 以下子命令仍可执行(会给出废弃相关提示),但不应在新脚本或新工程中再依赖,请优先改用 `vp` / `rt`(或文档中的 `vr`)。具体时间表以后续发布说明为准。
35
+ 以下命令仍可执行(会给出废弃相关提示),但不应在新脚本或新工程中再依赖,请优先改用 `vp` / `rt`(或文档中的 `vr`)。具体时间表以后续发布说明为准。
38
36
 
39
37
  | 命令 | 请改用 |
40
38
  | --- | --- |
@@ -45,7 +43,7 @@
45
43
  | `varlet-cli commit-lint` | `rt commit-lint` |
46
44
  | `varlet-cli checklist` | 用处极小,直接废弃 |
47
45
  | `varlet-cli changelog` | `rt changelog` |
48
- | `varlet-cli release` | `rt release`(或 `@varlet/release` 提供的 `vr release`) |
46
+ | `varlet-cli release` | `rt release` |
49
47
 
50
48
  ### 快速开始
51
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "3.15.0-alpha.1776609013808",
3
+ "version": "3.15.1",
4
4
  "description": "cli of varlet",
5
5
  "keywords": [
6
6
  "cli",
@@ -56,8 +56,8 @@
56
56
  "typescript": "5.6.3",
57
57
  "vite-plus": "0.1.18",
58
58
  "vue": "3.5.21",
59
- "@varlet/shared": "3.15.0-alpha.1776609013808",
60
- "@varlet/vite-plugins": "3.15.0-alpha.1776609013808"
59
+ "@varlet/shared": "3.15.1",
60
+ "@varlet/vite-plugins": "3.15.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/babel__core": "^7.20.1",
@@ -69,9 +69,9 @@
69
69
  "@types/node": "^20.19.0",
70
70
  "@types/sharp": "0.31.1",
71
71
  "rimraf": "^5.0.1",
72
- "@varlet/icons": "3.15.0-alpha.1776609013808",
73
- "@varlet/touch-emulator": "3.15.0-alpha.1776609013808",
74
- "@varlet/ui": "3.15.0-alpha.1776609013808"
72
+ "@varlet/touch-emulator": "3.15.1",
73
+ "@varlet/icons": "3.15.1",
74
+ "@varlet/ui": "3.15.1"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@vitest/coverage-istanbul": "4.1.4",
@@ -82,9 +82,9 @@
82
82
  "live-server": "^1.2.1",
83
83
  "vue": "3.5.21",
84
84
  "vue-router": "4.5.1",
85
- "@varlet/icons": "3.15.0-alpha.1776609013808",
86
- "@varlet/touch-emulator": "3.15.0-alpha.1776609013808",
87
- "@varlet/ui": "3.15.0-alpha.1776609013808"
85
+ "@varlet/icons": "3.15.1",
86
+ "@varlet/ui": "3.15.1",
87
+ "@varlet/touch-emulator": "3.15.1"
88
88
  },
89
89
  "engines": {
90
90
  "node": "^14.18.0 || >=16.0.0"
@@ -12,7 +12,7 @@
12
12
  "allowSyntheticDefaultImports": true,
13
13
  "jsxImportSource": "vue",
14
14
  "jsx": "preserve",
15
- "types": ["vite-plus/test/globals"],
15
+ "types": ["vite-plus/test/globals", "vite-plus/client"],
16
16
  "moduleResolution": "bundler"
17
17
  },
18
18
  "include": ["src", "types", "shims", "vite.config.mts", "varlet.config.mjs"],
@@ -1,14 +0,0 @@
1
- coverage/**
2
- highlight/**
3
- es/**
4
- umd/**
5
- lib/**
6
- site/**
7
- public/**
8
- .varlet/**
9
- types/index.d.ts
10
- *.md
11
- package.json
12
-
13
- pnpm-lock.yaml
14
- pnpm-workspace.yaml
@@ -1,52 +0,0 @@
1
- import { expect, test, vi } from 'vite-plus/test'
2
- import enUS from '../en-US'
3
- import { useLocale } from '../index'
4
-
5
- function mockConsole(method, fn = () => {}) {
6
- const originMethod = console[method]
7
-
8
- console[method] = fn
9
-
10
- return {
11
- mockRestore() {
12
- console[method] = originMethod
13
- },
14
- }
15
- }
16
-
17
- test('test add lang', () => {
18
- const { add, use, pack, packs } = useLocale()
19
-
20
- const LANG = 'custom'
21
- const PACK = {
22
- button: 'Custom Text',
23
- }
24
-
25
- add(LANG, PACK)
26
- use(LANG)
27
-
28
- expect(pack.value.lang).toBe(LANG)
29
- expect(packs[LANG]).toBe(PACK)
30
- })
31
-
32
- test('test merge lang', () => {
33
- const fn = vi.fn()
34
- const { mockRestore } = mockConsole('warn', fn)
35
- const { add, use, merge, pack } = useLocale()
36
-
37
- const LANG = 'en-US'
38
- const PACK = {
39
- button: 'Custom Text',
40
- }
41
-
42
- add(LANG, enUS)
43
- use('zh_HK')
44
- use(LANG)
45
- merge('zh_HK', PACK)
46
- merge(LANG, PACK)
47
-
48
- expect(pack.value.button).toBe('Custom Text')
49
- expect(fn).toHaveBeenCalledTimes(2)
50
-
51
- mockRestore()
52
- })
@@ -1,52 +0,0 @@
1
- import { expect, test, vi } from 'vite-plus/test'
2
- import enUS from '../en-US'
3
- import { useLocale } from '../index'
4
-
5
- function mockConsole(method, fn = () => {}) {
6
- const originMethod = console[method]
7
-
8
- console[method] = fn
9
-
10
- return {
11
- mockRestore() {
12
- console[method] = originMethod
13
- },
14
- }
15
- }
16
-
17
- test('test add lang', () => {
18
- const { add, use, pack, packs } = useLocale()
19
-
20
- const LANG = 'custom'
21
- const PACK = {
22
- button: 'Custom Text',
23
- }
24
-
25
- add(LANG, PACK)
26
- use(LANG)
27
-
28
- expect(pack.value.lang).toBe(LANG)
29
- expect(packs[LANG]).toBe(PACK)
30
- })
31
-
32
- test('test merge lang', () => {
33
- const fn = vi.fn()
34
- const { mockRestore } = mockConsole('warn', fn)
35
- const { add, use, merge, pack } = useLocale()
36
-
37
- const LANG = 'en-US'
38
- const PACK = {
39
- button: 'Custom Text',
40
- }
41
-
42
- add(LANG, enUS)
43
- use('zh_HK')
44
- use(LANG)
45
- merge('zh_HK', PACK)
46
- merge(LANG, PACK)
47
-
48
- expect(pack.value.button).toBe('Custom Text')
49
- expect(fn).toHaveBeenCalledTimes(2)
50
-
51
- mockRestore()
52
- })