Skip to content

Commit eae6769

Browse files
committed
feat: 增加卡片debug调试目录打包
1 parent d53c103 commit eae6769

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/hap-packager/src/plugins/resource-plugin.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ const { PACKAGER_BUILD_DONE } = eventBus
2727
const I18N_DIRECTORY = 'i18n'
2828
// lottie动画配置文件
2929
const LOTTIE_DIRECTORY = 'lottie'
30+
// debug动画配置文件
31+
const DEBUG_DIRECTORY = 'debug'
3032
// 需要打包的配置文件夹
3133
// directoryName:文件夹名称
3234
// onlyRoot:只遍历根目录,为false时会遍历所有的子目录
3335
const JSON_DIRECTORY_NEED_PACKAGING = [
3436
{ directoryName: I18N_DIRECTORY, onlyRoot: true },
35-
{ directoryName: LOTTIE_DIRECTORY, onlyRoot: false }
37+
{ directoryName: LOTTIE_DIRECTORY, onlyRoot: false },
38+
{ directoryName: DEBUG_DIRECTORY, onlyRoot: true }
3639
]
3740

3841
// 支持文件扩展名
@@ -251,8 +254,11 @@ ResourcePlugin.prototype.apply = function (compiler) {
251254
// **/*(*.!(${extpattern})|manifest.json)
252255
let files = getFiles(`**/+(!(${EXT_PATTERN})|manifest.json|sitemap.json)`, sourceDir)
253256
files = files.concat(
257+
// 打包快应用的配置文件夹下的文件
254258
getSpecifiedJSONFiles(sourceDir, JSON_DIRECTORY_NEED_PACKAGING),
259+
// 打包卡片的配置文件夹下的文件
255260
getWidgetJSONFiles(sourceDir, JSON_DIRECTORY_NEED_PACKAGING),
261+
// 打包快应用骨架屏文件夹下的文件
256262
getSkeletonConfigFile(sourceDir)
257263
)
258264
let iconPath

0 commit comments

Comments
 (0)