web-component-gallery 2.2.4 → 2.2.6

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.
@@ -50,7 +50,10 @@ function addLessVariables(newVars, lessContent) {
50
50
  }
51
51
 
52
52
  // 初始化处理并输出主题文件
53
- async function processLessFiles(theme) {
53
+ async function createStyleFiles(resetTheme) {
54
+ // 初始化主题
55
+ const theme = resetTheme || 'dark'
56
+
54
57
  try {
55
58
 
56
59
  // 并行获取文件内容
@@ -191,7 +194,7 @@ function createGeneratorTheme(theme) {
191
194
  const notIncludes = ['@white', '@black']
192
195
 
193
196
  // 输出自定义样式文件
194
- processLessFiles(resetTheme).then(themeVariables => {
197
+ createStyleFiles(resetTheme).then(themeVariables => {
195
198
  // 输出AntdVue样式打包放置public引入
196
199
  const options = {
197
200
  antDir: path.join(hostPath, 'ant-design-vue'),
@@ -210,7 +213,10 @@ function createGeneratorTheme(theme) {
210
213
  }
211
214
 
212
215
  // 生成传输信息文件
213
- async function createTransferFile() {
216
+ async function createTransferFile(theme) {
217
+ // 输出自定义样式文件
218
+ createStyleFiles(theme)
219
+
214
220
  // 默认请求源地址
215
221
  const origin = process.env.VUE_APP_STATIC_URL || 'http://qxfnkj.com'
216
222
 
@@ -219,7 +225,7 @@ async function createTransferFile() {
219
225
  const response = await fetch(`${origin}/base-subject/iframe/${fileName}`)
220
226
  if (!response.ok) throw new Error(`${fileName}文件请求失败!`)
221
227
 
222
- const responseText = await response.text()
228
+ const responseText = await response.text()
223
229
 
224
230
  // 写入传输文件
225
231
  const outPut = path.join(hostPath, `../src/utils/${fileName}`)
@@ -228,5 +234,6 @@ async function createTransferFile() {
228
234
 
229
235
  module.exports = {
230
236
  customFunctions,
237
+ createStyleFiles,
231
238
  createTransferFile
232
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [