@varlet/cli 1.22.0-alpha.3 → 1.22.0-alpha.4

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.
@@ -89,6 +89,15 @@ function inlineCSS(fileName, dir) {
89
89
  },
90
90
  };
91
91
  }
92
+ function clear() {
93
+ return {
94
+ name: 'varlet-clear-vite-plugin',
95
+ apply: 'build',
96
+ closeBundle: function () {
97
+ fs_extra_1.removeSync(path_1.resolve(constant_1.CWD, 'dist'));
98
+ },
99
+ };
100
+ }
92
101
  function getUMDConfig(varletConfig) {
93
102
  var name = lodash_1.get(varletConfig, 'name');
94
103
  var fileName = lodash_1.kebabCase(name) + ".js";
@@ -113,7 +122,7 @@ function getUMDConfig(varletConfig) {
113
122
  },
114
123
  },
115
124
  },
116
- plugins: [inlineCSS(fileName, constant_1.UMD_DIR)],
125
+ plugins: [inlineCSS(fileName, constant_1.UMD_DIR), clear()],
117
126
  };
118
127
  }
119
128
  exports.getUMDConfig = getUMDConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "1.22.0-alpha.3+019ba0c0",
3
+ "version": "1.22.0-alpha.4+442b86ed",
4
4
  "description": "cli of varlet",
5
5
  "bin": {
6
6
  "varlet-cli": "./lib/index.js"
@@ -31,7 +31,7 @@
31
31
  "dev": "tsc --watch",
32
32
  "build": "tsc"
33
33
  },
34
- "gitHead": "019ba0c08fc8b6a7636d27b8539ac8d02affd994",
34
+ "gitHead": "442b86ed2bb97f69d843de2246aeae2e6f00dfce",
35
35
  "dependencies": {
36
36
  "@babel/core": "^7.14.8",
37
37
  "@babel/preset-env": "^7.14.8",
@@ -44,7 +44,7 @@
44
44
  "@varlet/markdown-vite-plugin": "^1.20.0",
45
45
  "@varlet/stylelint-config": "^1.9.0",
46
46
  "@varlet/touch-emulator": "^1.0.1",
47
- "@varlet/ui": "^1.22.0-alpha.3+019ba0c0",
47
+ "@varlet/ui": "^1.22.0-alpha.4+442b86ed",
48
48
  "@vitejs/plugin-vue": "1.9.2",
49
49
  "@vitejs/plugin-vue-jsx": "1.1.8",
50
50
  "@vue/babel-plugin-jsx": "^1.0.7",