@varlet/cli 2.0.1 → 2.0.3-alpha.1665825802777

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.
@@ -6,7 +6,7 @@ interface VarletConfig {
6
6
  name?: string;
7
7
  /**
8
8
  * @default `var`
9
- * Component class name preffix
9
+ * Component name prefix
10
10
  */
11
11
  namespace?: string;
12
12
  /**
@@ -16,7 +16,7 @@ interface VarletConfig {
16
16
  host?: string;
17
17
  /**
18
18
  * @default `8080`
19
- * Local dev server protcol
19
+ * Local dev server port
20
20
  */
21
21
  port?: number;
22
22
  logo?: string;
@@ -38,6 +38,7 @@ interface VarletConfig {
38
38
  mobile?: Record<string, any>;
39
39
  moduleCompatible?: Record<string, string>;
40
40
  }
41
- export declare const defineConfig: (conf: VarletConfig) => VarletConfig;
41
+ export declare function defineConfig(conf: VarletConfig): VarletConfig;
42
+ export declare function mergeStrategy(value: any, srcValue: any, key: string): any[] | undefined;
42
43
  export declare function getVarletConfig(emit?: boolean): any;
43
44
  export {};
@@ -1,12 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVarletConfig = exports.defineConfig = void 0;
3
+ exports.getVarletConfig = exports.mergeStrategy = exports.defineConfig = void 0;
4
4
  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
- var defineConfig = function (conf) { return conf; };
8
+ var shared_1 = require("@varlet/shared");
9
+ function defineConfig(conf) {
10
+ return conf;
11
+ }
9
12
  exports.defineConfig = defineConfig;
13
+ function mergeStrategy(value, srcValue, key) {
14
+ if (key === 'features' && (0, shared_1.isArray)(srcValue)) {
15
+ return srcValue;
16
+ }
17
+ }
18
+ exports.mergeStrategy = mergeStrategy;
10
19
  function getVarletConfig(emit) {
11
20
  if (emit === void 0) { emit = false; }
12
21
  var config = {};
@@ -16,7 +25,7 @@ function getVarletConfig(emit) {
16
25
  }
17
26
  delete require.cache[require.resolve('../../varlet.default.config.js')];
18
27
  var defaultConfig = require('../../varlet.default.config.js');
19
- var mergedConfig = (0, lodash_1.merge)(defaultConfig, config);
28
+ var mergedConfig = (0, lodash_1.mergeWith)(defaultConfig, config, mergeStrategy);
20
29
  if (emit) {
21
30
  var source = JSON.stringify(mergedConfig, null, 2);
22
31
  (0, fsUtils_1.outputFileSyncOnChange)(constant_1.SITE_CONFIG, source);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.3-alpha.1665825802777",
4
4
  "description": "cli of varlet",
5
5
  "bin": {
6
6
  "varlet-cli": "./lib/bin.js"
@@ -34,10 +34,10 @@
34
34
  "@babel/helper-plugin-utils": "^7.14.5",
35
35
  "@babel/preset-env": "^7.14.8",
36
36
  "@babel/preset-typescript": "^7.14.5",
37
- "@varlet/icons": "2.0.1",
38
- "@varlet/markdown-vite-plugin": "2.0.1",
39
- "@varlet/shared": "2.0.1",
40
- "@varlet/touch-emulator": "2.0.1",
37
+ "@varlet/icons": "2.0.3-alpha.1665825802777",
38
+ "@varlet/markdown-vite-plugin": "2.0.3-alpha.1665825802777",
39
+ "@varlet/shared": "2.0.3-alpha.1665825802777",
40
+ "@varlet/touch-emulator": "2.0.3-alpha.1665825802777",
41
41
  "@vitejs/plugin-vue": "3.0.1",
42
42
  "@vitejs/plugin-vue-jsx": "2.0.0",
43
43
  "@vue/babel-plugin-jsx": "1.1.1",
@@ -82,7 +82,7 @@
82
82
  "@types/semver": "^7.3.9"
83
83
  },
84
84
  "peerDependencies": {
85
- "@varlet/touch-emulator": "2.0.1",
85
+ "@varlet/touch-emulator": "2.0.3-alpha.1665825802777",
86
86
  "@vue/runtime-core": "3.2.16",
87
87
  "@vue/test-utils": "^2.0.2",
88
88
  "clipboard": "^2.0.6",
@@ -403,6 +403,10 @@ iframe {
403
403
  padding: 0;
404
404
  font-size: 13px;
405
405
  }
406
+
407
+ a {
408
+ font-size: 13px;
409
+ }
406
410
  }
407
411
 
408
412
  em {