@varlet/cli 1.24.2-alpha.1640872324277 → 1.24.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.
package/README.en-US.md CHANGED
@@ -13,21 +13,21 @@ The out-of-the-box `Vue3 component library` rapid prototyping tool provides a se
13
13
  - 7.Out-of-the-box code publishing tool, publish to npm and github, and automatically generate a change log
14
14
  - 8.Support `Typescript`
15
15
  - 9.Support `Dark Mode`
16
+ - 10.Based on `pnpm`
16
17
 
17
18
  ### Quickstart
18
19
 
19
20
  `@varlet/cli` has built-in `single file component (sfc)` and `tsx, jsx` two styles of component library project templates, which can be directly generated by the `gen` command.
20
- To help users directly enter the development of the component itself, it is recommended to use `yarn` as a package management tool. First, make sure that `yarn` is installed and added to the system environment variables.
21
- The installation and configuration methods of `yarn` are not introduced here.
21
+ To help users directly enter the development of the component itself, it is recommended to use `pnpm` as a package management tool.
22
22
 
23
23
  ```shell
24
24
  # Install command line tools
25
- yarn global add @varlet/cli
25
+ pnpm add @varlet/cli -g
26
26
  # Use the gen command to generate the project
27
27
  varlet-cli gen projectName
28
28
  cd projectName
29
- yarn
30
- yarn dev
29
+ pnpm install
30
+ pnpm dev
31
31
  ```
32
32
 
33
33
  Then by simply modifying some basic information of the component library template,
@@ -238,6 +238,24 @@ varlet-cli test -wa
238
238
  varlet-cli lint
239
239
  ```
240
240
 
241
+ #### Lint commit message
242
+
243
+ ```shell
244
+ varlet-cli commit-lint
245
+ ```
246
+
247
+ #### Generate changelog
248
+
249
+ ```shell
250
+ varlet-cli changelog
251
+ ```
252
+
253
+ #### Release component library
254
+
255
+ ```shell
256
+ varlet-cli release
257
+ ```
258
+
241
259
  #### Quickly create a component folder
242
260
 
243
261
  ```shell
@@ -282,19 +300,13 @@ module.exports = {
282
300
 
283
301
  #### git-hook
284
302
 
285
- `husky`, `lint-staged` cooperate with `eslint`, `stylelint`, `commitlint` to check before commit,
303
+ `husky`, `lint-staged` cooperate with `eslint`, `stylelint`, `varlet-cli commit-lint` to check before commit,
286
304
  `package.json` configuration is as follows
287
305
 
288
306
  ```json
289
307
  {
290
308
  "scripts": {
291
- "prepare": "husky install",
292
- "commit": "git-cz"
293
- },
294
- "config": {
295
- "commitizen": {
296
- "path": "cz-conventional-changelog"
297
- }
309
+ "prepare": "husky install"
298
310
  },
299
311
  "lint-staged": {
300
312
  "*.{ts,tsx,js,vue,less}": "prettier --write",
@@ -331,15 +343,6 @@ module.exports = {
331
343
  }
332
344
  ```
333
345
 
334
- create `commitlint.config.js`
335
-
336
- ```js
337
- // commitlint.config.js
338
- module.exports = {
339
- extends: ['@commitlint/config-conventional'],
340
- }
341
- ```
342
-
343
346
  create `.prettierignore`
344
347
 
345
348
  ```text
@@ -373,36 +376,13 @@ create `tsconfig.json`
373
376
  }
374
377
  ```
375
378
 
376
- ### Release code
379
+ #### Note before release
377
380
 
378
- Use `release-it` and `conventional-changelog` for code release and update log generation.
379
- The configuration of `package.json` is as follows
381
+ - 1.The registry of npm must set to the official npm mirror
382
+ - 2.The npm must execute the login command for user login
380
383
 
381
- ```json
382
- {
383
- "scripts": {
384
- "genlog": "conventional-changelog -p angular -i CHANGELOG.md -s",
385
- "genAllLog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
386
- "release": "yarn compile && release-it"
387
- },
388
- "release-it": {
389
- "git": {
390
- "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
391
- "tagName": "v${version}",
392
- "commitMessage": "chore: release ${version}",
393
- "requireCleanWorkingDir": false
394
- },
395
- "plugins": {
396
- "@release-it/conventional-changelog": {
397
- "preset": "angular",
398
- "infile": "CHANGELOG.md"
399
- }
400
- }
401
- }
402
- }
403
- ```
404
-
405
- #### Note before release
384
+ ### Contributors
406
385
 
407
- - 1.The registry of npm and yarn must set to the official npm mirror
408
- - 2.Both npm and yarn must execute the login command for user login
386
+ <a href="https://github.com/haoziqaq/varlet/graphs/contributors">
387
+ <img src="https://contrib.rocks/image?repo=haoziqaq/varlet" />
388
+ </a>
package/README.md CHANGED
@@ -13,20 +13,21 @@
13
13
  - 7.开箱即用的代码发布工具,发布到npm和github,并自动生成更新日志
14
14
  - 8.支持`Typescript`
15
15
  - 9.支持`暗黑模式`
16
+ - 10.基于`pnpm`
16
17
 
17
18
  ### 快速开始
18
19
 
19
20
  `@varlet/cli`内置了`单文件组件(sfc)`和`tsx, jsx`两种风格的组件库项目模板,可以通过`gen`命令直接生成。
20
- 帮助用户直接进入组件本身的开发,这里推荐使用`yarn`作为包管理工具,首先确保安装了`yarn`并且添加到系统环境变量中去,这里不展开介绍`yarn`的安装和配置方法。
21
+ 帮助用户直接进入组件本身的开发,推荐使用`pnpm`作为包管理工具。
21
22
 
22
23
  ```shell
23
24
  # 安装命令行工具
24
- yarn global add @varlet/cli
25
+ pnpm add @varlet/cli -g
25
26
  # 使用gen命令生成项目
26
27
  varlet-cli gen 项目名
27
28
  cd 项目名
28
- yarn
29
- yarn dev
29
+ pnpm install
30
+ pnpm dev
30
31
  ```
31
32
 
32
33
  然后通过简单修改一些组件库模板的基础信息,就可以开始组件库的开发了
@@ -233,6 +234,24 @@ varlet-cli test -wa
233
234
  varlet-cli lint
234
235
  ```
235
236
 
237
+ #### 校验提交信息
238
+
239
+ ```shell
240
+ varlet-cli commit-lint
241
+ ```
242
+
243
+ #### 生成更新日志
244
+
245
+ ```shell
246
+ varlet-cli changelog
247
+ ```
248
+
249
+ #### 发布组件库
250
+
251
+ ```shell
252
+ varlet-cli release
253
+ ```
254
+
236
255
  #### 快速创建一个组件文件夹
237
256
 
238
257
  ```shell
@@ -277,18 +296,12 @@ module.exports = {
277
296
 
278
297
  #### git-hook
279
298
 
280
- `husky`,`lint-staged`配合`eslint`,`stylelint`,`commitlint`做commit前的检查,`package.json`配置如下
299
+ `husky`,`lint-staged`配合`eslint`,`stylelint`,`varlet-cli commit-lint`做commit前的检查,`package.json`配置如下
281
300
 
282
301
  ```json
283
302
  {
284
303
  "scripts": {
285
- "prepare": "husky install",
286
- "commit": "git-cz"
287
- },
288
- "config": {
289
- "commitizen": {
290
- "path": "cz-conventional-changelog"
291
- }
304
+ "prepare": "husky install"
292
305
  },
293
306
  "lint-staged": {
294
307
  "*.{ts,tsx,js,vue,less}": "prettier --write",
@@ -325,15 +338,6 @@ module.exports = {
325
338
  }
326
339
  ```
327
340
 
328
- 创建`commitlint.config.js`
329
-
330
- ```js
331
- // commitlint.config.js
332
- module.exports = {
333
- extends: ['@commitlint/config-conventional'],
334
- }
335
- ```
336
-
337
341
  创建`.prettierignore`
338
342
 
339
343
  ```text
@@ -367,35 +371,13 @@ src/*/__tests__/**
367
371
  }
368
372
  ```
369
373
 
370
- ### 发布代码
374
+ #### 发布前注意
371
375
 
372
- 使用`release-it`和`conventional-changelog`进行代码发布和更新日志的生成,`package.json`配置如下
376
+ - 1.npm的仓库源必须指向npm官方镜像
377
+ - 2.执行npm login进行登录
373
378
 
374
- ```json
375
- {
376
- "scripts": {
377
- "genlog": "conventional-changelog -p angular -i CHANGELOG.md -s",
378
- "genAllLog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
379
- "release": "yarn compile && release-it"
380
- },
381
- "release-it": {
382
- "git": {
383
- "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
384
- "tagName": "v${version}",
385
- "commitMessage": "chore: release ${version}",
386
- "requireCleanWorkingDir": false
387
- },
388
- "plugins": {
389
- "@release-it/conventional-changelog": {
390
- "preset": "angular",
391
- "infile": "CHANGELOG.md"
392
- }
393
- }
394
- }
395
- }
396
- ```
397
-
398
- #### 发布前注意
379
+ ### Contributors
399
380
 
400
- - 1.npm和yarn的仓库源必须指向npm官方镜像
401
- - 2.npm和yarn都必须执行login命令进行用户登录
381
+ <a href="https://github.com/haoziqaq/varlet/graphs/contributors">
382
+ <img src="https://contrib.rocks/image?repo=haoziqaq/varlet" />
383
+ </a>
@@ -1,4 +1,4 @@
1
1
  #!/bin/sh
2
2
  . "$(dirname "$0")/_/husky.sh"
3
3
 
4
- npx --no-install commitlint --edit $1
4
+ npx --no-install varlet-cli commit-lint $1
@@ -17,16 +17,15 @@
17
17
  "license": "MIT",
18
18
  "scripts": {
19
19
  "husky": "husky install",
20
- "commit": "git-cz",
20
+ "preinstall": "npx only-allow pnpm",
21
21
  "dev": "varlet-cli dev",
22
22
  "build": "varlet-cli build",
23
23
  "preview": "varlet-cli preview",
24
24
  "compile": "varlet-cli compile",
25
25
  "create": "varlet-cli create",
26
26
  "lint": "varlet-cli lint",
27
- "genlog": "conventional-changelog -p angular -i CHANGELOG.md -s",
28
- "genAllLog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
29
- "release": "pnpm compile && release-it",
27
+ "changelog": "varlet-cli changelog",
28
+ "release": "pnpm compile && varlet-cli release",
30
29
  "test": "varlet-cli jest",
31
30
  "test:watch": "varlet-cli jest -w",
32
31
  "test:watchAll": "varlet-cli jest -wa"
@@ -36,26 +35,20 @@
36
35
  },
37
36
  "devDependencies": {
38
37
  "@varlet/cli": "workspace:*",
39
- "vue": "3.2.16"
40
- },
41
- "release-it": {
42
- "git": {
43
- "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
44
- "tagName": "v${version}",
45
- "commitMessage": "chore: release ${version}",
46
- "requireCleanWorkingDir": false
47
- },
48
- "plugins": {
49
- "@release-it/conventional-changelog": {
50
- "preset": "angular",
51
- "infile": "CHANGELOG.md"
52
- }
53
- }
54
- },
55
- "config": {
56
- "commitizen": {
57
- "path": "cz-conventional-changelog"
58
- }
38
+ "@varlet/touch-emulator": "workspace:*",
39
+ "@varlet/icons": "workspace:*",
40
+ "@varlet/eslint-config": "workspace:*",
41
+ "@varlet/stylelint-config": "workspace:*",
42
+ "@vue/test-utils": "2.0.0-rc.6",
43
+ "vue-router": "4.0.12",
44
+ "vue": "3.2.16",
45
+ "live-server": "^1.2.1",
46
+ "prettier": "^2.3.2",
47
+ "stylelint": "^13.13.1",
48
+ "eslint": "^7.30.0",
49
+ "lint-staged": "^10.5.0",
50
+ "lodash-es": "^4.17.21",
51
+ "clipboard": "^2.0.6"
59
52
  },
60
53
  "lint-staged": {
61
54
  "*.{ts,tsx,js,vue,less}": "prettier --write",
@@ -94,5 +87,6 @@
94
87
  "browserslist": [
95
88
  "Chrome >= 51",
96
89
  "iOS >= 10"
97
- ]
90
+ ],
91
+ "packageManager": "pnpm@6.24.3"
98
92
  }
@@ -47,14 +47,13 @@ var path_1 = require("path");
47
47
  var constant_1 = require("../shared/constant");
48
48
  var varlet_config_1 = require("../config/varlet.config");
49
49
  var lodash_1 = require("lodash");
50
- var varletConfig = (0, varlet_config_1.getVarletConfig)();
51
50
  function create(name) {
52
51
  return __awaiter(this, void 0, void 0, function () {
53
52
  var namespace, bigCamelizeName, vueTemplate, indexTemplate, testsTemplate, exampleTemplate, localeIndexTemplate, localTemplate, componentDir, testsDir, exampleDir, exampleLocalDir, docsDir;
54
53
  return __generator(this, function (_a) {
55
54
  switch (_a.label) {
56
55
  case 0:
57
- namespace = (0, lodash_1.get)(varletConfig, 'namespace');
56
+ namespace = (0, lodash_1.get)((0, varlet_config_1.getVarletConfig)(), 'namespace');
58
57
  bigCamelizeName = (0, fsUtils_1.bigCamelize)(name);
59
58
  vueTemplate = "<template>\n <div class=\"".concat(namespace, "-").concat(name, "\"></div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n name: '").concat((0, fsUtils_1.bigCamelize)(namespace)).concat(bigCamelizeName, "'\n})\n</script>\n\n<style lang=\"less\">\n.").concat(namespace, "-").concat(name, " {\n display: flex;\n}\n</style>\n");
60
59
  indexTemplate = "import ".concat(bigCamelizeName, " from './").concat(bigCamelizeName, ".vue'\nimport type { App } from 'vue'\n\n").concat(bigCamelizeName, ".install = function(app: App) {\n app.component(").concat(bigCamelizeName, ".name, ").concat(bigCamelizeName, ")\n}\n\nexport const _").concat(bigCamelizeName, "Component = ").concat(bigCamelizeName, "\n\nexport default ").concat(bigCamelizeName, "\n");
@@ -53,8 +53,12 @@ function syncVersion(name) {
53
53
  var file = (0, path_1.resolve)(constant_1.CWD, name, 'package.json');
54
54
  var pkg = JSON.parse((0, fs_extra_1.readFileSync)(file, 'utf-8'));
55
55
  var cliPkg = JSON.parse((0, fs_extra_1.readFileSync)(constant_1.CLI_PACKAGE_JSON, 'utf-8'));
56
- pkg.devDependencies['@varlet/cli'] = "^".concat(cliPkg.version);
57
- pkg.files = ['es', 'lib', 'umd', 'highlight', 'types', 'README.md'];
56
+ Object.keys(pkg.devDependencies).forEach(function (key) {
57
+ if (key.startsWith('@varlet')) {
58
+ pkg.devDependencies[key] = "^".concat(cliPkg.version);
59
+ }
60
+ });
61
+ pkg.files = ['es', 'lib', 'umd', 'highlight', 'types'];
58
62
  (0, fs_extra_1.writeFileSync)(file, JSON.stringify(pkg, null, 2));
59
63
  }
60
64
  function gen(name) {
@@ -203,7 +203,7 @@ function buildSiteEntry() {
203
203
  return __generator(this, function (_a) {
204
204
  switch (_a.label) {
205
205
  case 0:
206
- (0, varlet_config_1.getVarletConfig)();
206
+ (0, varlet_config_1.getVarletConfig)(true);
207
207
  return [4 /*yield*/, Promise.all([buildMobileSiteRoutes(), buildPcSiteRoutes(), buildSiteSource()])];
208
208
  case 1:
209
209
  _a.sent();
@@ -2,9 +2,9 @@ export declare const replaceDot: (s: string) => string;
2
2
  export declare const replaceUnderline: (s: string) => string;
3
3
  export declare function parseTable(table: string): string[][];
4
4
  export declare function compileTable(md: string, titleRe: RegExp): string;
5
- export declare function compileTags(table: Record<string, any>, tags: Record<string, any>, componentName: string): void;
6
- export declare function compileAttributes(table: Record<string, any>, attributes: Record<string, any>, componentName: string): void;
7
- export declare function compileWebTypes(table: Record<string, any>, webTypes: Record<string, any>, componentName: string): void;
8
- export declare function compileMD(path: string, tags: Record<string, any>, attributes: Record<string, any>, webTypes: Record<string, any>): void;
9
- export declare function compileDir(path: string, tags: Record<string, any>, attributes: Record<string, any>, webTypes: Record<string, any>): void;
5
+ export declare function compileTags(table: Record<string, any>, tags: Record<string, any>, componentName: string, varletConfig: Record<string, any>): void;
6
+ export declare function compileAttributes(table: Record<string, any>, attributes: Record<string, any>, componentName: string, varletConfig: Record<string, any>): void;
7
+ export declare function compileWebTypes(table: Record<string, any>, webTypes: Record<string, any>, componentName: string, varletConfig: Record<string, any>): void;
8
+ export declare function compileMD(path: string, tags: Record<string, any>, attributes: Record<string, any>, webTypes: Record<string, any>, varletConfig: Record<string, any>): void;
9
+ export declare function compileDir(path: string, tags: Record<string, any>, attributes: Record<string, any>, webTypes: Record<string, any>, varletConfig: Record<string, any>): void;
10
10
  export declare function compileTemplateHighlight(): Promise<void>;
@@ -43,7 +43,6 @@ var path_1 = require("path");
43
43
  var fsUtils_1 = require("../shared/fsUtils");
44
44
  var lodash_1 = require("lodash");
45
45
  var varlet_config_1 = require("../config/varlet.config");
46
- var varletConfig = (0, varlet_config_1.getVarletConfig)();
47
46
  var TABLE_HEAD_RE = /\s*\|.*\|\s*\n\s*\|.*---+\s*\|\s*\n+/;
48
47
  var TABLE_FOOT_RE = /(\|\s*$)|(\|\s*\n(?!\s*\|))/;
49
48
  var replaceDot = function (s) { return s.replace(/`/g, ''); };
@@ -84,13 +83,13 @@ function compileTable(md, titleRe) {
84
83
  return md.replace(/\\\|/g, '__varlet_axis__').trim();
85
84
  }
86
85
  exports.compileTable = compileTable;
87
- function compileTags(table, tags, componentName) {
86
+ function compileTags(table, tags, componentName, varletConfig) {
88
87
  tags["".concat((0, lodash_1.get)(varletConfig, 'namespace'), "-").concat(componentName)] = {
89
88
  attributes: table.attributesTable.map(function (row) { return (0, exports.replaceDot)(row[0]); }),
90
89
  };
91
90
  }
92
91
  exports.compileTags = compileTags;
93
- function compileAttributes(table, attributes, componentName) {
92
+ function compileAttributes(table, attributes, componentName, varletConfig) {
94
93
  table.attributesTable.forEach(function (row) {
95
94
  var attrNamespace = "".concat((0, lodash_1.get)(varletConfig, 'namespace'), "-").concat(componentName, "/").concat((0, exports.replaceDot)(row[0]));
96
95
  attributes[attrNamespace] = {
@@ -100,7 +99,7 @@ function compileAttributes(table, attributes, componentName) {
100
99
  });
101
100
  }
102
101
  exports.compileAttributes = compileAttributes;
103
- function compileWebTypes(table, webTypes, componentName) {
102
+ function compileWebTypes(table, webTypes, componentName, varletConfig) {
104
103
  var attributesTable = table.attributesTable, eventsTable = table.eventsTable, slotsTable = table.slotsTable;
105
104
  var attributes = attributesTable.map(function (row) { return ({
106
105
  name: (0, exports.replaceDot)(row[0]),
@@ -127,7 +126,7 @@ function compileWebTypes(table, webTypes, componentName) {
127
126
  });
128
127
  }
129
128
  exports.compileWebTypes = compileWebTypes;
130
- function compileMD(path, tags, attributes, webTypes) {
129
+ function compileMD(path, tags, attributes, webTypes, varletConfig) {
131
130
  if (!path.endsWith(constant_1.HL_MD)) {
132
131
  return;
133
132
  }
@@ -141,28 +140,29 @@ function compileMD(path, tags, attributes, webTypes) {
141
140
  eventsTable: eventsTable,
142
141
  slotsTable: slotsTable,
143
142
  };
144
- compileWebTypes(table, webTypes, componentName);
145
- compileTags(table, tags, componentName);
146
- compileAttributes(table, attributes, componentName);
143
+ compileWebTypes(table, webTypes, componentName, varletConfig);
144
+ compileTags(table, tags, componentName, varletConfig);
145
+ compileAttributes(table, attributes, componentName, varletConfig);
147
146
  }
148
147
  exports.compileMD = compileMD;
149
- function compileDir(path, tags, attributes, webTypes) {
148
+ function compileDir(path, tags, attributes, webTypes, varletConfig) {
150
149
  var dir = (0, fs_extra_1.readdirSync)(path);
151
150
  dir.forEach(function (filename) {
152
151
  var filePath = (0, path_1.resolve)(path, filename);
153
- (0, fsUtils_1.isDir)(filePath) && compileDir(filePath, tags, attributes, webTypes);
154
- (0, fsUtils_1.isMD)(filePath) && compileMD(filePath, tags, attributes, webTypes);
152
+ (0, fsUtils_1.isDir)(filePath) && compileDir(filePath, tags, attributes, webTypes, varletConfig);
153
+ (0, fsUtils_1.isMD)(filePath) && compileMD(filePath, tags, attributes, webTypes, varletConfig);
155
154
  });
156
155
  }
157
156
  exports.compileDir = compileDir;
158
157
  function compileTemplateHighlight() {
159
158
  return __awaiter(this, void 0, void 0, function () {
160
- var tags, attributes, webTypes;
159
+ var varletConfig, tags, attributes, webTypes;
161
160
  return __generator(this, function (_a) {
162
161
  switch (_a.label) {
163
162
  case 0: return [4 /*yield*/, (0, fs_extra_1.ensureDir)(constant_1.HL_DIR)];
164
163
  case 1:
165
164
  _a.sent();
165
+ varletConfig = (0, varlet_config_1.getVarletConfig)();
166
166
  tags = {};
167
167
  attributes = {};
168
168
  webTypes = {
@@ -177,7 +177,7 @@ function compileTemplateHighlight() {
177
177
  },
178
178
  },
179
179
  };
180
- compileDir(constant_1.SRC_DIR, tags, attributes, webTypes);
180
+ compileDir(constant_1.SRC_DIR, tags, attributes, webTypes, varletConfig);
181
181
  return [4 /*yield*/, Promise.all([
182
182
  (0, fs_extra_1.writeFile)(constant_1.HL_WEB_TYPES_JSON, JSON.stringify(webTypes, null, 2)),
183
183
  (0, fs_extra_1.writeFile)(constant_1.HL_TAGS_JSON, JSON.stringify(tags, null, 2)),
@@ -1 +1 @@
1
- export declare function getVarletConfig(): Record<string, any>;
1
+ export declare function getVarletConfig(emit?: boolean): Record<string, any>;
@@ -5,7 +5,8 @@ var fs_extra_1 = require("fs-extra");
5
5
  var lodash_1 = require("lodash");
6
6
  var constant_1 = require("../shared/constant");
7
7
  var fsUtils_1 = require("../shared/fsUtils");
8
- function getVarletConfig() {
8
+ function getVarletConfig(emit) {
9
+ if (emit === void 0) { emit = false; }
9
10
  var config = {};
10
11
  if ((0, fs_extra_1.pathExistsSync)(constant_1.VARLET_CONFIG)) {
11
12
  delete require.cache[require.resolve(constant_1.VARLET_CONFIG)];
@@ -14,8 +15,10 @@ function getVarletConfig() {
14
15
  delete require.cache[require.resolve('../../varlet.default.config.js')];
15
16
  var defaultConfig = require('../../varlet.default.config.js');
16
17
  var mergedConfig = (0, lodash_1.merge)(defaultConfig, config);
17
- var source = JSON.stringify(mergedConfig, null, 2);
18
- (0, fsUtils_1.outputFileSyncOnChange)(constant_1.SITE_CONFIG, source);
18
+ if (emit) {
19
+ var source = JSON.stringify(mergedConfig, null, 2);
20
+ (0, fsUtils_1.outputFileSyncOnChange)(constant_1.SITE_CONFIG, source);
21
+ }
19
22
  return mergedConfig;
20
23
  }
21
24
  exports.getVarletConfig = getVarletConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "1.24.2-alpha.1640872324277",
3
+ "version": "1.24.2",
4
4
  "description": "cli of varlet",
5
5
  "bin": {
6
6
  "varlet-cli": "./lib/index.js"
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "gitHead": "ee9c3866bedad96c86365b0f9888a3a6bb781b1f",
31
31
  "dependencies": {
32
- "@varlet/icons": "1.24.2-alpha.1640872324277",
33
- "@varlet/markdown-vite-plugin": "1.24.2-alpha.1640872324277",
34
- "@varlet/touch-emulator": "1.24.2-alpha.1640872324277",
32
+ "@varlet/icons": "1.24.2",
33
+ "@varlet/markdown-vite-plugin": "1.24.2",
34
+ "@varlet/touch-emulator": "1.24.2",
35
35
  "@babel/core": "^7.14.8",
36
36
  "@babel/preset-env": "^7.14.8",
37
37
  "@babel/preset-typescript": "^7.14.5",
@@ -73,7 +73,7 @@
73
73
  "@types/lodash-es": "^4.17.5"
74
74
  },
75
75
  "peerDependencies": {
76
- "@varlet/touch-emulator": "1.24.2-alpha.1640872324277",
76
+ "@varlet/touch-emulator": "1.24.2",
77
77
  "@vue/test-utils": "^2.0.0-rc.6",
78
78
  "vue": "3.2.16",
79
79
  "vue-router": "4.0.12",
package/site/index.html CHANGED
@@ -9,6 +9,9 @@
9
9
  <link href="<%= logo %>" rel="icon" type="image/png" />
10
10
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
11
11
  name="viewport" />
12
+ <meta property="og:title" content="<%= pcTitle %>" />
13
+ <meta property="og:type" content="website" />
14
+ <meta property="og:image" content="<%= logo %>" />
12
15
  <style>
13
16
  @font-face {
14
17
  font-family: "Roboto";
package/site/mobile.html CHANGED
@@ -9,6 +9,9 @@
9
9
  <link href="<%= logo %>" rel="icon" type="image/png" />
10
10
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
11
11
  name="viewport" />
12
+ <meta property="og:title" content="<%= mobileTitle %>" />
13
+ <meta property="og:type" content="website" />
14
+ <meta property="og:image" content="<%= logo %>" />
12
15
  <style>
13
16
  @font-face {
14
17
  font-family: "Roboto";
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ['@commitlint/config-conventional'],
3
- }