From 8420a4a74bf3dd55948486a95e80c3d62ed9a5dd Mon Sep 17 00:00:00 2001 From: "Vivy.Pan" Date: Wed, 15 Feb 2023 10:33:41 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14241=20refactor:=E8=B0=83=E6=95=B4js?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=89=93=E5=8C=85,=E7=94=A8index.js=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2blob=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/date/index.js | 1 + webpack/attachments.js | 42 ++++++++++++++++++++-------------------- webpack/components.js | 28 +++++++++++++-------------- 3 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 src/widget/date/index.js diff --git a/src/widget/date/index.js b/src/widget/date/index.js new file mode 100644 index 000000000..9b964cb02 --- /dev/null +++ b/src/widget/date/index.js @@ -0,0 +1 @@ +export * from "./calendar"; \ No newline at end of file diff --git a/webpack/attachments.js b/webpack/attachments.js index fe607fba9..2611ec397 100644 --- a/webpack/attachments.js +++ b/webpack/attachments.js @@ -13,7 +13,7 @@ const runtimePolyfill = ["@babel/polyfill", "es6-promise/auto"]; const basicAttachmentMap = { polyfill: sync([ "src/core/0.foundation.js", - "src/polyfill/**/*.js", + "src/polyfill/*.js", ]).concat(runtimePolyfill), core: sync([ "src/less/core/**/*.less", @@ -44,16 +44,16 @@ const basicAttachmentMap = { // "src/component/**/*.js", ]), router: sync([ - "src/router/**/*.js", + "src/router/*.js", ]), core_without_platform: sync([ "src/core/0.foundation.js", lodashJs, - "src/core/**/*.js", - "src/data/**/*.js", + "src/core/index.js", + // "src/data/**/*.js", ], [ - "src/core/platform/**/*.js", - "src/core/controller/**/*.js", + "src/core/platform/index.js", + "src/core/controller/index.js", ]), core_without_normalize: sync( ["src/less/core/**/*.less", "src/less/theme/**/*.less"], ["src/less/core/normalize.less", "src/less/core/normalize2.less"] @@ -62,8 +62,8 @@ const basicAttachmentMap = { "src/less/core/**/*.less", "src/less/theme/**/*.less", lodashJs, - "src/core/**/*.js", - "src/data/**/*.js", + "src/core/index.js", + // "src/data/**/*.js", ], [ "src/core/conflict.js", ]), @@ -72,22 +72,22 @@ const basicAttachmentMap = { ts: ['./typescript/bundle.ts'], ui: sync([ 'ui/less/app.less', - 'ui/less/**/*.less', - 'ui/js/**/*.js', + 'ui/less/*.less', + 'ui/js/index.js', ]), config: sync(["demo/version.js", "i18n/i18n.cn.js"]), utils: sync([ "src/core/0.foundation.js", lodashJs, - "src/core/constant/**/*.js", - "src/core/func/**/*.js", + "src/core/constant/index.js", + "src/core/func/index.js", "src/core/2.base.js", "src/core/3.ob.js", "src/core/5.inject.js", "src/core/utils/*.js", "i18n/i18n.cn.js", "_mobile/date.i18n.cn.js", - "src/data/**/*.js", + // "src/data/**/*.js", ]), fix: [fixJs], fixProxy: [fixProxyJs], @@ -111,7 +111,7 @@ const bundle = [].concat( sync(["public/less/app.less", "public/less/**/*.less"]), [fixCompact, workerCompact], basicAttachmentMap.router, - sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]), + sync(["public/js/index.js", "public/js/index.js", "i18n/i18n.cn.js"]), basicAttachmentMap.ts, ); @@ -139,7 +139,7 @@ const coreJs = [].concat( const resource = sync(["private/less/app.less", "private/less/**/*.less"]); -const config = sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]); +const config = sync(["public/js/index.js", "public/js/index.js", "i18n/i18n.cn.js"]); const bundleWithoutNormalize = [].concat( basicAttachmentMap.core_without_normalize, @@ -219,21 +219,21 @@ const fineuiWithoutJqueryAndPolyfillJs = [].concat( sync([ "src/core/0.foundation.js", lodashJs, - "src/core/**/*.js", - "src/data/**/*.js", + "src/core/index.js", + // "src/data/**/*.js", ], [ "src/core/platform/web/**/*.js", ]), basicAttachmentMap.fix, sync([ - "src/base/**/*.js", - "src/case/**/*.js", + "src/base/index.js", + "src/case/index.js", ], [ "src/base/single/input/file.js", - "src/case/ztree/**/*.js", + "src/case/ztree/index.js", ]), basicAttachmentMap.widget, - sync([fixCompact, workerCompact, "ui/js/**/*.js"]), + sync([fixCompact, workerCompact, "ui/js/index.js"]), basicAttachmentMap.ts, ); diff --git a/webpack/components.js b/webpack/components.js index 0162cfd2a..de4f18163 100644 --- a/webpack/components.js +++ b/webpack/components.js @@ -1,22 +1,22 @@ const { sync, uniq } = require("./utils"); const basicAttachmentMap = { - single: sync(["src/base/single/**/*.js"]), - layer: sync(["src/base/layer/**/*.js"]), + single: sync(["src/base/single/index.js"]), + layer: sync(["src/base/layer/index.js"]), pane: sync(["src/base/1.pane.js"]), button_group: sync(["src/base/combination/group.button.js"]), - buttons: sync(["src/case/button/**/*.js"]), - checkboxes: sync(["src/case/checkbox/**/*.js"]), - combos: sync(["src/case/combo/**/*.js"]), - editors: sync(["src/case/editor/**/*.js"]), - triggers: sync(["src/case/trigger/**/*.js"]), - calendar: sync(["src/case/calendar/**/*.js"]), - color_chooser: sync(["src/case/colorchooser/**/*.js"]), - segment: sync(["src/case/segment/**/*.js"]), - linear_segment: sync(["src/case/linearsegment/**/*.js"]), - date: sync(["src/widget/date/**/*.js"]), - down_list: sync(["src/widget/downlist/**/*.js"]), - text_value_down_list_combo: sync(["src/widget/textvaluedownlistcombo/**/*.js"]), + buttons: sync(["src/case/button/index.js"]), + checkboxes: sync(["src/case/checkbox/index.js"]), + combos: sync(["src/case/combo/index.js"]), + editors: sync(["src/case/editor/index.js"]), + triggers: sync(["src/case/trigger/index.js"]), + calendar: sync(["src/case/calendar/index.js"]), + color_chooser: sync(["src/case/colorchooser/index.js"]), + segment: sync(["src/case/segment/index.js"]), + linear_segment: sync(["src/case/linearsegment/index.js"]), + date: sync(["src/widget/date/index.js"]), + down_list: sync(["src/widget/downlist/index.js"]), + text_value_down_list_combo: sync(["src/widget/textvaluedownlistcombo/index.js"]), }; module.exports = {