diff --git a/karma.conf.js b/karma.conf.js index 4c8850be5c..874d47a098 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -20,17 +20,6 @@ module.exports = function (config) { // list of files / patterns to load in the browser files: [ "dist/fineui.min.css", - "src/core/foundation.js", - "src/core/lodash.js", - "src/core/base.js", - "i18n/i18n.cn.js", - "src/core/ob.js", - "src/core/widget.js", - "src/core/shortcut.js", - "src/core/utils/**/*.js", - "src/core/behavior/behavior.js", - "src/core/wrapper/layout.js", - "src/core/plugin.js", "src/core/**/*.js", "src/data/**/*.js", "src/data/**/*.js", @@ -44,12 +33,12 @@ module.exports = function (config) { "src/base/single/tip/tip.js", "src/base/combination/group.button.js", "src/base/combination/tree.button.js", - "src/base/tree/ztree/treeview.js", - "src/base/tree/ztree/asynctree.js", - "src/base/tree/ztree/parttree.js", - "src/base/tree/ztree/list/listtreeview.js", - "src/base/tree/ztree/list/listasynctree.js", - "src/base/tree/ztree/list/listparttree.js", + "src/base/platform/web/ztree/treeview.js", + "src/base/platform/web/ztree/asynctree.js", + "src/case/ztree/parttree.js", + "src/case/ztree/list/listtreeview.js", + "src/case/ztree/list/listasynctree.js", + "src/case/ztree/list/listparttree.js", "src/base/**/*.js", "src/case/**/*.js", "src/widget/**/*.js", diff --git a/src/base/base.js b/src/base/0.base.js similarity index 100% rename from src/base/base.js rename to src/base/0.base.js diff --git a/src/base/pane.js b/src/base/1.pane.js similarity index 100% rename from src/base/pane.js rename to src/base/1.pane.js diff --git a/src/base/single/single.js b/src/base/single/0.single.js similarity index 100% rename from src/base/single/single.js rename to src/base/single/0.single.js diff --git a/src/base/single/text.js b/src/base/single/1.text.js similarity index 100% rename from src/base/single/text.js rename to src/base/single/1.text.js diff --git a/src/base/single/tip/tip.js b/src/base/single/tip/0.tip.js similarity index 100% rename from src/base/single/tip/tip.js rename to src/base/single/tip/0.tip.js diff --git a/src/base/tree/ztree/treeview.js b/src/case/ztree/0.treeview.js similarity index 100% rename from src/base/tree/ztree/treeview.js rename to src/case/ztree/0.treeview.js diff --git a/src/base/tree/ztree/asynctree.js b/src/case/ztree/1.asynctree.js similarity index 100% rename from src/base/tree/ztree/asynctree.js rename to src/case/ztree/1.asynctree.js diff --git a/src/base/tree/ztree/jquery.ztree.core-3.5.js b/src/case/ztree/jquery.ztree.core-3.5.js similarity index 100% rename from src/base/tree/ztree/jquery.ztree.core-3.5.js rename to src/case/ztree/jquery.ztree.core-3.5.js diff --git a/src/base/tree/ztree/jquery.ztree.excheck-3.5.js b/src/case/ztree/jquery.ztree.excheck-3.5.js similarity index 100% rename from src/base/tree/ztree/jquery.ztree.excheck-3.5.js rename to src/case/ztree/jquery.ztree.excheck-3.5.js diff --git a/src/base/tree/ztree/list/listtreeview.js b/src/case/ztree/list/0.listtreeview.js similarity index 100% rename from src/base/tree/ztree/list/listtreeview.js rename to src/case/ztree/list/0.listtreeview.js diff --git a/src/base/tree/ztree/list/listasynctree.js b/src/case/ztree/list/1.listasynctree.js similarity index 100% rename from src/base/tree/ztree/list/listasynctree.js rename to src/case/ztree/list/1.listasynctree.js diff --git a/src/base/tree/ztree/list/listparttree.js b/src/case/ztree/list/listparttree.js similarity index 100% rename from src/base/tree/ztree/list/listparttree.js rename to src/case/ztree/list/listparttree.js diff --git a/src/base/tree/ztree/parttree.js b/src/case/ztree/parttree.js similarity index 100% rename from src/base/tree/ztree/parttree.js rename to src/case/ztree/parttree.js diff --git a/src/case/tree/ztree/tree.display.js b/src/case/ztree/tree.display.js similarity index 100% rename from src/case/tree/ztree/tree.display.js rename to src/case/ztree/tree.display.js diff --git a/src/case/tree/ztree/tree.list.display.js b/src/case/ztree/tree.list.display.js similarity index 100% rename from src/case/tree/ztree/tree.list.display.js rename to src/case/ztree/tree.list.display.js diff --git a/src/case/tree/ztree/tree.simple.js b/src/case/ztree/tree.simple.js similarity index 100% rename from src/case/tree/ztree/tree.simple.js rename to src/case/ztree/tree.simple.js diff --git a/src/base/tree/ztree/treerender.scroll.service.js b/src/case/ztree/treerender.scroll.service.js similarity index 100% rename from src/base/tree/ztree/treerender.scroll.service.js rename to src/case/ztree/treerender.scroll.service.js diff --git a/src/base/tree/ztree/treetrender.page.service.js b/src/case/ztree/treetrender.page.service.js similarity index 100% rename from src/base/tree/ztree/treetrender.page.service.js rename to src/case/ztree/treetrender.page.service.js diff --git a/src/core/foundation.js b/src/core/0.foundation.js similarity index 100% rename from src/core/foundation.js rename to src/core/0.foundation.js diff --git a/src/core/lodash.js b/src/core/1.lodash.js similarity index 100% rename from src/core/lodash.js rename to src/core/1.lodash.js diff --git a/src/core/base.js b/src/core/2.base.js similarity index 100% rename from src/core/base.js rename to src/core/2.base.js diff --git a/src/core/ob.js b/src/core/3.ob.js similarity index 100% rename from src/core/ob.js rename to src/core/3.ob.js diff --git a/src/core/widget.js b/src/core/4.widget.js similarity index 100% rename from src/core/widget.js rename to src/core/4.widget.js diff --git a/src/core/shortcut.js b/src/core/5.shortcut.js similarity index 100% rename from src/core/shortcut.js rename to src/core/5.shortcut.js diff --git a/src/core/inject.js b/src/core/6.inject.js similarity index 100% rename from src/core/inject.js rename to src/core/6.inject.js diff --git a/src/core/plugin.js b/src/core/7.plugin.js similarity index 100% rename from src/core/plugin.js rename to src/core/7.plugin.js diff --git a/src/core/behavior/behavior.js b/src/core/behavior/0.behavior.js similarity index 100% rename from src/core/behavior/behavior.js rename to src/core/behavior/0.behavior.js diff --git a/src/core/func/date.i18n.js b/src/core/constant/date.i18n.js similarity index 100% rename from src/core/func/date.i18n.js rename to src/core/constant/date.i18n.js diff --git a/src/core/events.js b/src/core/constant/events.js similarity index 100% rename from src/core/events.js rename to src/core/constant/events.js diff --git a/src/core/var.js b/src/core/constant/var.js similarity index 100% rename from src/core/var.js rename to src/core/constant/var.js diff --git a/src/core/controller.js b/src/core/controller/0.controller.js similarity index 100% rename from src/core/controller.js rename to src/core/controller/0.controller.js diff --git a/src/core/alias.js b/src/core/func/alias.js similarity index 100% rename from src/core/alias.js rename to src/core/func/alias.js diff --git a/src/core/utils/aes.js b/src/core/structure/aes.js similarity index 100% rename from src/core/utils/aes.js rename to src/core/structure/aes.js diff --git a/src/core/utils/aspect.js b/src/core/structure/aspect.js similarity index 100% rename from src/core/utils/aspect.js rename to src/core/structure/aspect.js diff --git a/src/core/utils/base64.js b/src/core/structure/base64.js similarity index 100% rename from src/core/utils/base64.js rename to src/core/structure/base64.js diff --git a/src/core/utils/cache.js b/src/core/structure/cache.js similarity index 100% rename from src/core/utils/cache.js rename to src/core/structure/cache.js diff --git a/src/core/utils/cellSizeAndPositionManager.js b/src/core/structure/cellSizeAndPositionManager.js similarity index 100% rename from src/core/utils/cellSizeAndPositionManager.js rename to src/core/structure/cellSizeAndPositionManager.js diff --git a/src/core/utils/heap.js b/src/core/structure/heap.js similarity index 100% rename from src/core/utils/heap.js rename to src/core/structure/heap.js diff --git a/src/core/utils/linkedHashMap.js b/src/core/structure/linkedHashMap.js similarity index 100% rename from src/core/utils/linkedHashMap.js rename to src/core/structure/linkedHashMap.js diff --git a/src/core/utils/lru.js b/src/core/structure/lru.js similarity index 100% rename from src/core/utils/lru.js rename to src/core/structure/lru.js diff --git a/src/core/utils/prefixIntervalTree.js b/src/core/structure/prefixIntervalTree.js similarity index 100% rename from src/core/utils/prefixIntervalTree.js rename to src/core/structure/prefixIntervalTree.js diff --git a/src/core/utils/queue.js b/src/core/structure/queue.js similarity index 100% rename from src/core/utils/queue.js rename to src/core/structure/queue.js diff --git a/src/core/utils/sectionManager.js b/src/core/structure/sectionManager.js similarity index 100% rename from src/core/utils/sectionManager.js rename to src/core/structure/sectionManager.js diff --git a/src/core/utils/tree.js b/src/core/structure/tree.js similarity index 100% rename from src/core/utils/tree.js rename to src/core/structure/tree.js diff --git a/src/core/utils/vector.js b/src/core/structure/vector.js similarity index 100% rename from src/core/utils/vector.js rename to src/core/structure/vector.js diff --git a/src/core/platform/web/eventlistener.js b/src/core/utils/events/eventlistener.js similarity index 100% rename from src/core/platform/web/eventlistener.js rename to src/core/utils/events/eventlistener.js diff --git a/src/core/i18n.js b/src/core/utils/i18n.js similarity index 100% rename from src/core/i18n.js rename to src/core/utils/i18n.js diff --git a/webpack/attachments.js b/webpack/attachments.js index 35fbb5fda4..7655c1408c 100644 --- a/webpack/attachments.js +++ b/webpack/attachments.js @@ -13,11 +13,11 @@ const fixIEJs = "./dist/fix/fix.ie.js"; const fixCompact = "./dist/fix/fix.compact.js"; const fixIECompact = './dist/fix/fix.compact.ie.js'; const workerCompact = './dist/fix/worker.compact.js'; -const lodashJs = "src/core/lodash.js"; +const lodashJs = "src/core/1.lodash.js"; const basicAttachmentMap = { - polyfill: sync(["src/core/foundation.js", "src/polyfill/**/*.js"]).concat(["@babel/polyfill", "es6-promise/auto"]), - polyfillIE: sync(["src/core/foundation.js", "src/polyfill/**/*.js"]).concat([ + polyfill: sync(["src/core/0.foundation.js", "src/polyfill/**/*.js"]).concat(["@babel/polyfill", "es6-promise/auto"]), + polyfillIE: sync(["src/core/0.foundation.js", "src/polyfill/**/*.js"]).concat([ "core-js/features/object/define-property", "core-js/features/object/create", "core-js/features/object/assign", @@ -34,46 +34,18 @@ const basicAttachmentMap = { core: sync([ "src/less/core/**/*.less", "src/less/theme/**/*.less", - "src/core/foundation.js", lodashJs, - // 'src/core/mvc/**/*.js', - "src/core/base.js", - "src/core/ob.js", - "src/core/widget.js", - // 'src/core/model.js', - // 'src/core/view.js', - "src/core/shortcut.js", - "src/core/utils/**/*.js", - "src/core/behavior/behavior.js", - "src/core/wrapper/layout.js", - "src/core/plugin.js", "src/core/**/*.js", - "src/data/data.js", "src/data/**/*.js", ]), // 最基础的控件 base: sync([ "src/less/base/**/*.less", "src/third/**/*.js", - "src/base/pane.js", - "src/base/single/single.js", - "src/base/single/text.js", - "src/base/single/button/button.basic.js", - "src/base/single/button/button.node.js", - "src/base/single/tip/tip.js", - "src/base/combination/group.button.js", - "src/base/combination/tree.button.js", - "src/base/tree/ztree/treeview.js", - "src/base/tree/ztree/asynctree.js", - "src/base/tree/ztree/parttree.js", - "src/base/tree/ztree/list/listtreeview.js", - "src/base/tree/ztree/list/listasynctree.js", - "src/base/tree/ztree/list/listparttree.js", "src/base/**/*.js", ]), // 实现好的一些基础实例 case: sync([ - "src/case/combo/popup.bubble.js", "src/case/**/*.js", ]), widget: sync([ @@ -97,23 +69,16 @@ const basicAttachmentMap = { ]), config: sync(["demo/version.js", "i18n/i18n.cn.js"]), utils: sync([ - "src/core/foundation.js", + "src/core/0.foundation.js", lodashJs, - "src/core/var.js", - "src/core/func/array.js", - "src/core/func/number.js", - "src/core/func/string.js", - "src/core/func/date.js", - "src/core/func/function.js", - "src/core/base.js", - "src/core/ob.js", - "src/core/alias.js", - "src/core/inject.js", - "src/core/i18n.js", + "src/core/constant/**/*.js", + "src/core/func/**/*.js", + "src/core/2.base.js", + "src/core/3.ob.js", + "src/core/6.inject.js", "src/core/utils/*.js", "i18n/i18n.cn.js", "_mobile/date.i18n.cn.js", - "src/data/data.js", "src/data/**/*.js", ]), fix: [fixJs], @@ -205,38 +170,15 @@ const fineuiWithoutJqueryAndPolyfillJs = [].concat( sync([ "src/core/foundation.js", lodashJs, - // 'src/core/mvc/**/*.js', - "src/core/base.js", - "src/core/ob.js", - "src/core/widget.js", - // 'src/core/model.js', - // 'src/core/view.js', - "src/core/shortcut.js", - "src/core/utils/*.js", - "src/core/behavior/behavior.js", - "src/core/wrapper/layout.js", - "src/core/plugin.js", "src/core/**/*.js", - "!src/core/platform/web/**/*.js", - "src/data/data.js", "src/data/**/*.js", "dist/fix/fix.js", - "src/base/pane.js", - "src/base/single/single.js", - "src/base/single/text.js", - "src/base/single/button/button.basic.js", - "src/base/single/button/button.node.js", - "src/base/single/tip/tip.js", - "src/base/combination/group.button.js", - "src/base/combination/tree.button.js", - "src/base/combination/map.button.js", "src/base/**/*.js", - "!src/base/tree/ztree/**/*.js", - "!src/base/single/input/file.js", - "src/case/combo/popup.bubble.js", "src/case/**/*.js", - "!src/case/colorchooser/**/*.js", - "!src/case/tree/ztree/**/*.js", + + "!src/core/platform/web/**/*.js", + "!src/base/single/input/file.js", + "!src/case/ztree/**/*.js", ]), basicAttachmentMap.widget, sync([fixCompact, workerCompact, "ui/js/**/*.js"]),