@varlet/cli 3.15.0-alpha.1776606769606 → 3.15.0

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 latest 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
- | **`@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 |
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 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 **latest 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
  | --- | --- |
@@ -43,9 +41,9 @@ These subcommands **still run** for backward compatibility and may print a depre
43
41
  | `varlet-cli dev:extension` | `vp pack --watch` (with a local `vite.config.ts` for the extension) |
44
42
  | `varlet-cli build:extension` | `vp pack` |
45
43
  | `varlet-cli commit-lint` | `rt commit-lint` |
46
- | `varlet-cli checklist` | _(no direct replacement; optional manual checklist in docs)_ |
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
- | **`@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` 等工程自动化 |
29
+ | `@varlet/cli` | Varlet 一等能力:`create`、`gen`、`dev`、`build`、`preview`、`compile`、`compile:style-vars`、`build:icons`、`test` 等 |
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
  | --- | --- |
@@ -43,9 +41,9 @@
43
41
  | `varlet-cli dev:extension` | `vp pack --watch`(扩展包内需有本地 `vite.config.ts`) |
44
42
  | `varlet-cli build:extension` | `vp pack` |
45
43
  | `varlet-cli commit-lint` | `rt commit-lint` |
46
- | `varlet-cli checklist` | 无直接替代;见贡献文档中的提交前说明 |
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.1776606769606",
3
+ "version": "3.15.0",
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/vite-plugins": "3.15.0-alpha.1776606769606",
60
- "@varlet/shared": "3.15.0-alpha.1776606769606"
59
+ "@varlet/shared": "3.15.0",
60
+ "@varlet/vite-plugins": "3.15.0"
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/ui": "3.15.0-alpha.1776606769606",
73
- "@varlet/icons": "3.15.0-alpha.1776606769606",
74
- "@varlet/touch-emulator": "3.15.0-alpha.1776606769606"
72
+ "@varlet/icons": "3.15.0",
73
+ "@varlet/touch-emulator": "3.15.0",
74
+ "@varlet/ui": "3.15.0"
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.1776606769606",
86
- "@varlet/touch-emulator": "3.15.0-alpha.1776606769606",
87
- "@varlet/ui": "3.15.0-alpha.1776606769606"
85
+ "@varlet/touch-emulator": "3.15.0",
86
+ "@varlet/icons": "3.15.0",
87
+ "@varlet/ui": "3.15.0"
88
88
  },
89
89
  "engines": {
90
90
  "node": "^14.18.0 || >=16.0.0"
@@ -3,11 +3,86 @@ import { defineConfig } from '@varlet/cli'
3
3
  export default defineConfig({
4
4
  logo: './logo.svg',
5
5
  useMobile: true,
6
+ title: 'Varlet X',
6
7
  pc: {
8
+ description: {
9
+ 'zh-CN':
10
+ 'Varlet X 是一个基于 Vue3 开发的 Material design 组件库,支持移动端和桌面端,由 varletjs 组织开发和维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件以保证良好的开发体验。',
11
+ 'en-US':
12
+ 'Varlet X is a Material design component library developed based on Vue3, supporting mobile and desktop, developed and maintained by varletjs organization. Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience.',
13
+ },
7
14
  header: {
8
15
  darkMode: null,
9
16
  playground: null,
10
17
  versions: null,
18
+ changelog: null,
19
+ },
20
+ indexPage: {
21
+ sponsors: null,
22
+ contributors: null,
23
+ teamMembers: null,
24
+ features: [
25
+ {
26
+ name: {
27
+ 'zh-CN': '特性',
28
+ 'en-US': 'Feature',
29
+ },
30
+ description: {
31
+ 'zh-CN': '特性描述',
32
+ 'en-US': 'Feature description',
33
+ },
34
+ },
35
+ {
36
+ name: {
37
+ 'zh-CN': '特性',
38
+ 'en-US': 'Feature',
39
+ },
40
+ description: {
41
+ 'zh-CN': '特性描述',
42
+ 'en-US': 'Feature description',
43
+ },
44
+ },
45
+ {
46
+ name: {
47
+ 'zh-CN': '特性',
48
+ 'en-US': 'Feature',
49
+ },
50
+ description: {
51
+ 'zh-CN': '特性描述',
52
+ 'en-US': 'Feature description',
53
+ },
54
+ },
55
+ {
56
+ name: {
57
+ 'zh-CN': '特性',
58
+ 'en-US': 'Feature',
59
+ },
60
+ description: {
61
+ 'zh-CN': '特性描述',
62
+ 'en-US': 'Feature description',
63
+ },
64
+ },
65
+ {
66
+ name: {
67
+ 'zh-CN': '特性',
68
+ 'en-US': 'Feature',
69
+ },
70
+ description: {
71
+ 'zh-CN': '特性描述',
72
+ 'en-US': 'Feature description',
73
+ },
74
+ },
75
+ {
76
+ name: {
77
+ 'zh-CN': '特性',
78
+ 'en-US': 'Feature',
79
+ },
80
+ description: {
81
+ 'zh-CN': '特性描述',
82
+ 'en-US': 'Feature description',
83
+ },
84
+ },
85
+ ],
11
86
  },
12
87
  menu: [
13
88
  {
@@ -46,5 +121,11 @@ export default defineConfig({
46
121
  header: {
47
122
  darkMode: null,
48
123
  },
124
+ title: {
125
+ 'zh-CN':
126
+ 'Varlet X 是一个基于 Vue3 开发的 Material design 组件库,支持移动端和桌面端,由 varletjs 组织开发和维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件以保证良好的开发体验。',
127
+ 'en-US':
128
+ 'Varlet X is a Material design component library developed based on Vue3, supporting mobile and desktop, developed and maintained by varletjs organization. Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience.',
129
+ },
49
130
  },
50
131
  })
@@ -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
- })