Browse Source

Pull request #3440: KERNEL-14241 refactor:调整js相关打包,用index.js替换blob语法

Merge in VISUAL/fineui from ~VIVY.PAN/fineui:es6 to es6

* commit '8048faf126c7c16c8aa230102cd26a9ce59d2291':
  KERNEL-14241 refactor:demo增加index.js,调整打包
  KERNEL-14241 refactor:调整js相关打包,用index.js替换blob语法
es6
Vivy.Pan-潘柯芋 2 years ago
parent
commit
cad5dbbdd2
  1. 4
      demo/index.js
  2. 5
      demo/js/base/button/index.js
  3. 3
      demo/js/base/editor/index.js
  4. 11
      demo/js/base/index.js
  5. 3
      demo/js/base/tip/index.js
  6. 3
      demo/js/base/tree/index.js
  7. 8
      demo/js/case/combo/index.js
  8. 5
      demo/js/case/editor/index.js
  9. 15
      demo/js/case/index.js
  10. 3
      demo/js/case/item/index.js
  11. 2
      demo/js/case/list/index.js
  12. 2
      demo/js/case/pager/index.js
  13. 4
      demo/js/case/pane/index.js
  14. 3
      demo/js/case/tree/index.js
  15. 4
      demo/js/case/triggers/index.js
  16. 5
      demo/js/component/index.js
  17. 8
      demo/js/config/index.js
  18. 10
      demo/js/core/abstract/combination/index.js
  19. 11
      demo/js/core/abstract/index.js
  20. 3
      demo/js/core/index.js
  21. 18
      demo/js/core/layout/index.js
  22. 4
      demo/js/core/popup/index.js
  23. 10
      demo/js/fix-2.0/index.js
  24. 16
      demo/js/index.js
  25. 5
      demo/js/widget/basewidget/index.js
  26. 1
      demo/js/widget/collapase/index.js
  27. 2
      demo/js/widget/date/index.js
  28. 1
      demo/js/widget/datetime/index.js
  29. 2
      demo/js/widget/downlist/index.js
  30. 2
      demo/js/widget/editor/index.js
  31. 23
      demo/js/widget/index.js
  32. 2
      demo/js/widget/multiselect/index.js
  33. 2
      demo/js/widget/multitree/index.js
  34. 1
      demo/js/widget/numbereditor/index.js
  35. 1
      demo/js/widget/numberinterval/index.js
  36. 2
      demo/js/widget/selecttree/index.js
  37. 1
      demo/js/widget/singleselct/index.js
  38. 2
      demo/js/widget/singletree/index.js
  39. 1
      demo/js/widget/slider/index.js
  40. 1
      demo/js/widget/timecombo/index.js
  41. 1
      demo/js/widget/timeinterval/index.js
  42. 4
      demo/js/widget/tree/index.js
  43. 1
      demo/js/widget/year/index.js
  44. 1
      demo/js/widget/yearinterval/index.js
  45. 1
      demo/js/widget/yearmonth/index.js
  46. 1
      demo/js/widget/yearmonthinterval/index.js
  47. 1
      demo/js/widget/yearquarter/index.js
  48. 1
      demo/js/widget/yearquarterinterval/index.js
  49. 1
      src/core/platform/index.js
  50. 4
      src/polyfill/index.js
  51. 2
      src/router/index.js
  52. 1
      src/widget/date/index.js
  53. 48
      webpack/attachments.js
  54. 34
      webpack/components.js

4
demo/index.js

@ -0,0 +1,4 @@
export * from "./app";
export * from "./config";
export * from "./version";
export * from "./js";

5
demo/js/base/button/index.js

@ -0,0 +1,5 @@
export * from "./demo.button";
export * from "./demo.icon_button";
export * from "./demo.image_button";
export * from "./demo.joker.icon";
export * from "./demo.text_button";

3
demo/js/base/editor/index.js

@ -0,0 +1,3 @@
export * from "./demo.editor";
export * from "./demo.multifile_editor";
export * from "./demo.textarea_editor";

11
demo/js/base/index.js

@ -0,0 +1,11 @@
export * from "./demo.html";
export * from "./demo.icon_label";
export * from "./demo.label";
export * from "./demo.label.scene";
export * from "./demo.message";
export * from "./demo.pager";
export * from "./button";
export * from "./editor";
export * from "./tip";
export * from "./tree";

3
demo/js/base/tip/index.js

@ -0,0 +1,3 @@
export * from "./demo.bubble";
export * from "./demo.title";
export * from "./demo.toast";

3
demo/js/base/tree/index.js

@ -0,0 +1,3 @@
export * from "./demo.part_tree";
export * from "./demo.sync_tree";
export * from "./demo.tree_view";

8
demo/js/case/combo/index.js

@ -0,0 +1,8 @@
export * from "./demo.bubble_combo";
export * from "./demo.editor_icon_check_combo";
export * from "./demo.icon_combo";
export * from "./demo.icon_text_value_combo";
export * from "./demo.search_text_value_combo";
export * from "./demo.text_value_combo";
export * from "./demo.text_value_down_list_combo";
export * from "./demo.text_vlaue_check_combo";

5
demo/js/case/editor/index.js

@ -0,0 +1,5 @@
export * from "./demo.clear_editor";
export * from "./demo.shelter_editor";
export * from "./demo.sign_editor";
export * from "./demo.simple_state_editor";
export * from "./demo.state_editor";

15
demo/js/case/index.js

@ -0,0 +1,15 @@
export * from "./combo";
export * from "./editor";
export * from "./item";
export * from "./list";
export * from "./pager";
export * from "./pane";
export * from "./tree";
export * from "./triggers";
export * from "./demo.calendar";
export * from "./demo.click.effect";
export * from "./demo.color_chooser";
export * from "./demo.color_chooser_popup";
export * from "./demo.segment";

3
demo/js/case/item/index.js

@ -0,0 +1,3 @@
export * from "./demo.multi_select_item";
export * from "./demo.single_select_item";
export * from "./demo.single_select_radio_item";

2
demo/js/case/list/index.js

@ -0,0 +1,2 @@
export * from "./demo.lazy_loader";
export * from "./demo.select_list";

2
demo/js/case/pager/index.js

@ -0,0 +1,2 @@
export * from "./demo.all_count_pager";
export * from "./demo.direction_pager";

4
demo/js/case/pane/index.js

@ -0,0 +1,4 @@
export * from "./demo.list_pane";
export * from "./demo.multi_popup_view";
export * from "./demo.panel";
export * from "./demo.popup_panel";

3
demo/js/case/tree/index.js

@ -0,0 +1,3 @@
export * from "./demo.display_tree";
export * from "./demo.level_tree";
export * from "./demo.simple_tree";

4
demo/js/case/triggers/index.js

@ -0,0 +1,4 @@
export * from "./demo.editor_trigger";
export * from "./demo.icon_trigger";
export * from "./demo.select_text_trigger";
export * from "./demo.text_trigger";

5
demo/js/component/index.js

@ -0,0 +1,5 @@
export * from "./demo.form";
export * from "./demo.treevaluechoosercombo";
export * from "./demo.treevaluechooserpane";
export * from "./demo.valuechoosercombo";
export * from "./demo.valuechooserpane";

8
demo/js/config/index.js

@ -0,0 +1,8 @@
export * from "./base";
export * from "./case";
export * from "./category";
export * from "./component";
export * from "./core";
export * from "./demo.pane";
export * from "./fix";
export * from "./widget";

10
demo/js/core/abstract/combination/index.js

@ -0,0 +1,10 @@
export * from "./demo.combo";
export * from "./demo.combo2";
export * from "./demo.combo3";
export * from "./demo.combo_group";
export * from "./demo.expander";
export * from "./demo.loader";
export * from "./demo.navigation";
export * from "./demo.sercher";
export * from "./demo.switcher";
export * from "./demo.tab";

11
demo/js/core/abstract/index.js

@ -0,0 +1,11 @@
export * from "./combination";
export * from "./demo.button_group";
export * from "./demo.button_tree";
export * from "./demo.collection_view";
export * from "./demo.custom_tree";
export * from "./demo.grid_view";
export * from "./demo.list_view";
export * from "./demo.virtual_group";
export * from "./demo.virtual_group_item";
export * from "./demo.virtual_list";

3
demo/js/core/index.js

@ -0,0 +1,3 @@
export * from "./abstract";
export * from "./layout";
export * from "./popup";

18
demo/js/core/layout/index.js

@ -0,0 +1,18 @@
export * from "./demo.absolute";
export * from "./demo.border";
export * from "./demo.center";
export * from "./demo.center_adapt";
export * from "./demo.float_center";
export * from "./demo.flow";
export * from "./demo.grid";
export * from "./demo.horizontal";
export * from "./demo.horizontal_adapt";
export * from "./demo.horizontal_auto";
export * from "./demo.horizontal_float";
export * from "./demo.htape";
export * from "./demo.left_right_vertical_adapt";
export * from "./demo.table";
export * from "./demo.td";
export * from "./demo.vertical";
export * from "./demo.vertical_adapt";
export * from "./demo.vtape";

4
demo/js/core/popup/index.js

@ -0,0 +1,4 @@
export * from "./demo.layer";
export * from "./demo.popover";
export * from "./demo.popup_view";
export * from "./demo.searcher_view";

10
demo/js/fix-2.0/index.js

@ -0,0 +1,10 @@
export * from "./computed";
export * from "./context";
export * from "./define";
export * from "./demo";
export * from "./globalwatcher";
export * from "./inject";
export * from "./scene";
export * from "./state";
export * from "./store";
export * from "./watcher";

16
demo/js/index.js

@ -0,0 +1,16 @@
export * from "./center";
export * from "./face";
export * from "./main";
export * from "./main.store";
export * from "./north";
export * from "./preview";
export * from "./router";
export * from "./west";
export * from "./base";
export * from "./case";
export * from "./component";
export * from "./config";
export * from "./core";
export * from "./fix-2.0";
export * from "./widget";

5
demo/js/widget/basewidget/index.js

@ -0,0 +1,5 @@
export * from "./demo.buttons";
export * from "./demo.items";
export * from "./demo.nodes";
export * from "./demo.sagments";
export * from "./demo.tips";

1
demo/js/widget/collapase/index.js

@ -0,0 +1 @@
export * from "./demo.collapse";

2
demo/js/widget/date/index.js

@ -0,0 +1,2 @@
export * from "./demo.datepane";
export * from "./demo.multidate_combo";

1
demo/js/widget/datetime/index.js

@ -0,0 +1 @@
export * from "./demo.datetime";

2
demo/js/widget/downlist/index.js

@ -0,0 +1,2 @@
export * from "./demo.downlist";
export * from "./demo.downlist.icon";

2
demo/js/widget/editor/index.js

@ -0,0 +1,2 @@
export * from "./demo.search_editor";
export * from "./demo.text_editor";

23
demo/js/widget/index.js

@ -0,0 +1,23 @@
export * from "./basewidget";
export * from "./collapase";
export * from "./date";
export * from "./datetime";
export * from "./downlist";
export * from "./editor";
export * from "./multiselect";
export * from "./multiselect";
export * from "./multitree";
export * from "./numbereditor";
export * from "./numberinterval";
export * from "./selecttree";
export * from "./singleselct";
export * from "./slider";
export * from "./timecombo";
export * from "./timeinterval";
export * from "./tree";
export * from "./year";
export * from "./yearinterval";
export * from "./yearmonth";
export * from "./yearmonthinterval";
export * from "./yearquarter";
export * from "./yearquarterinterval";

2
demo/js/widget/multiselect/index.js

@ -0,0 +1,2 @@
export * from "./demo.multi_select_combo";
export * from "./demo.multi_select_list";

2
demo/js/widget/multitree/index.js

@ -0,0 +1,2 @@
export * from "./demo.multi_tree_combo";
export * from "./demo.multi_tree_list";

1
demo/js/widget/numbereditor/index.js

@ -0,0 +1 @@
export * from "./demo.number_editor";

1
demo/js/widget/numberinterval/index.js

@ -0,0 +1 @@
export * from "./demo.number_interval";

2
demo/js/widget/selecttree/index.js

@ -0,0 +1,2 @@
export * from "./demo.multilayer_select_tree_combo";
export * from "./demo.select_tree_combo";

1
demo/js/widget/singleselct/index.js

@ -0,0 +1 @@
export * from "./demo.single_select_combo";

2
demo/js/widget/singletree/index.js

@ -0,0 +1,2 @@
export * from "./demo.multilayer_single_tree_combo";
export * from "./demo.single_tree_combo";

1
demo/js/widget/slider/index.js

@ -0,0 +1 @@
export * from "./demo.slider";

1
demo/js/widget/timecombo/index.js

@ -0,0 +1 @@
export * from "./demo.timecombo";

1
demo/js/widget/timeinterval/index.js

@ -0,0 +1 @@
export * from "./demo.time_interval";

4
demo/js/widget/tree/index.js

@ -0,0 +1,4 @@
export * from "./demo.multilayer_select_level_tree";
export * from "./demo.multilayer_single_level_tree";
export * from "./demo.select_level_tree";
export * from "./demo.single_level_tree";

1
demo/js/widget/year/index.js

@ -0,0 +1 @@
export * from "./demo.year";

1
demo/js/widget/yearinterval/index.js

@ -0,0 +1 @@
export * from "./demo.year_interval";

1
demo/js/widget/yearmonth/index.js

@ -0,0 +1 @@
export * from "./demo.year_month_combo";

1
demo/js/widget/yearmonthinterval/index.js

@ -0,0 +1 @@
export * from "./demo.year_month_interval";

1
demo/js/widget/yearquarter/index.js

@ -0,0 +1 @@
export * from "./demo.year_quarter_combo";

1
demo/js/widget/yearquarterinterval/index.js

@ -0,0 +1 @@
export * from "./demo.yearquarterinterval";

1
src/core/platform/index.js

@ -0,0 +1 @@
export * from "./web";

4
src/polyfill/index.js

@ -0,0 +1,4 @@
export * from "./console";
export * from "./event";
export * from "./number";
export * from "./sort";

2
src/router/index.js

@ -0,0 +1,2 @@
export * from "./0.router";
export * from "./router";

1
src/widget/date/index.js

@ -0,0 +1 @@
export * from "./calendar";

48
webpack/attachments.js

@ -13,7 +13,7 @@ const runtimePolyfill = ["@babel/polyfill", "es6-promise/auto"];
const basicAttachmentMap = { const basicAttachmentMap = {
polyfill: sync([ polyfill: sync([
"src/core/0.foundation.js", "src/core/0.foundation.js",
"src/polyfill/**/*.js", "src/polyfill/index.js",
]).concat(runtimePolyfill), ]).concat(runtimePolyfill),
core: sync([ core: sync([
"src/less/core/**/*.less", "src/less/core/**/*.less",
@ -44,16 +44,16 @@ const basicAttachmentMap = {
// "src/component/**/*.js", // "src/component/**/*.js",
]), ]),
router: sync([ router: sync([
"src/router/**/*.js", "src/router/index.js",
]), ]),
core_without_platform: sync([ core_without_platform: sync([
"src/core/0.foundation.js", "src/core/0.foundation.js",
lodashJs, lodashJs,
"src/core/**/*.js", "src/core/index.js",
"src/data/**/*.js", // "src/data/**/*.js",
], [ ], [
"src/core/platform/**/*.js", "src/core/platform/index.js",
"src/core/controller/**/*.js", "src/core/controller/index.js",
]), ]),
core_without_normalize: sync( core_without_normalize: sync(
["src/less/core/**/*.less", "src/less/theme/**/*.less"], ["src/less/core/normalize.less", "src/less/core/normalize2.less"] ["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/core/**/*.less",
"src/less/theme/**/*.less", "src/less/theme/**/*.less",
lodashJs, lodashJs,
"src/core/**/*.js", "src/core/index.js",
"src/data/**/*.js", // "src/data/**/*.js",
], [ ], [
"src/core/conflict.js", "src/core/conflict.js",
]), ]),
@ -72,22 +72,22 @@ const basicAttachmentMap = {
ts: ['./typescript/bundle.ts'], ts: ['./typescript/bundle.ts'],
ui: sync([ ui: sync([
'ui/less/app.less', 'ui/less/app.less',
'ui/less/**/*.less', 'ui/less/*.less',
'ui/js/**/*.js', 'ui/js/index.js',
]), ]),
config: sync(["demo/version.js", "i18n/i18n.cn.js"]), config: sync(["demo/version.js", "i18n/i18n.cn.js"]),
utils: sync([ utils: sync([
"src/core/0.foundation.js", "src/core/0.foundation.js",
lodashJs, lodashJs,
"src/core/constant/**/*.js", "src/core/constant/index.js",
"src/core/func/**/*.js", "src/core/func/index.js",
"src/core/2.base.js", "src/core/2.base.js",
"src/core/3.ob.js", "src/core/3.ob.js",
"src/core/5.inject.js", "src/core/5.inject.js",
"src/core/utils/*.js", "src/core/utils/index.js",
"i18n/i18n.cn.js", "i18n/i18n.cn.js",
"_mobile/date.i18n.cn.js", "_mobile/date.i18n.cn.js",
"src/data/**/*.js", // "src/data/**/*.js",
]), ]),
fix: [fixJs], fix: [fixJs],
fixProxy: [fixProxyJs], fixProxy: [fixProxyJs],
@ -111,7 +111,7 @@ const bundle = [].concat(
sync(["public/less/app.less", "public/less/**/*.less"]), sync(["public/less/app.less", "public/less/**/*.less"]),
[fixCompact, workerCompact], [fixCompact, workerCompact],
basicAttachmentMap.router, 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, basicAttachmentMap.ts,
); );
@ -139,7 +139,7 @@ const coreJs = [].concat(
const resource = sync(["private/less/app.less", "private/less/**/*.less"]); 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( const bundleWithoutNormalize = [].concat(
basicAttachmentMap.core_without_normalize, basicAttachmentMap.core_without_normalize,
@ -219,21 +219,21 @@ const fineuiWithoutJqueryAndPolyfillJs = [].concat(
sync([ sync([
"src/core/0.foundation.js", "src/core/0.foundation.js",
lodashJs, lodashJs,
"src/core/**/*.js", "src/core/index.js",
"src/data/**/*.js", // "src/data/**/*.js",
], [ ], [
"src/core/platform/web/**/*.js", "src/core/platform/index.js",
]), ]),
basicAttachmentMap.fix, basicAttachmentMap.fix,
sync([ sync([
"src/base/**/*.js", "src/base/index.js",
"src/case/**/*.js", "src/case/index.js",
], [ ], [
"src/base/single/input/file.js", "src/base/single/input/file.js",
"src/case/ztree/**/*.js", "src/case/ztree/index.js",
]), ]),
basicAttachmentMap.widget, basicAttachmentMap.widget,
sync([fixCompact, workerCompact, "ui/js/**/*.js"]), sync([fixCompact, workerCompact, "ui/js/index.js"]),
basicAttachmentMap.ts, basicAttachmentMap.ts,
); );
@ -249,7 +249,7 @@ const demo = [].concat(
sync(["public/less/app.less", "public/less/**/*.less"]), sync(["public/less/app.less", "public/less/**/*.less"]),
[fixCompact, workerCompact], [fixCompact, workerCompact],
basicAttachmentMap.ts, basicAttachmentMap.ts,
sync(["demo/less/*.less", "demo/less/**/*.less", "demo/app.js", "demo/js/**/*.js", "demo/config.js"]), sync(["demo/less/*.less", "demo/less/**/*.less", "demo/app.js", "demo/js/index.js", "demo/config.js"]),
); );
module.exports = { module.exports = {

34
webpack/components.js

@ -1,22 +1,20 @@
const { sync, uniq } = require("./utils");
const basicAttachmentMap = { const basicAttachmentMap = {
single: sync(["src/base/single/**/*.js"]), single: ["src/base/single/index.js"],
layer: sync(["src/base/layer/**/*.js"]), layer: ["src/base/layer/index.js"],
pane: sync(["src/base/1.pane.js"]), pane: ["src/base/1.pane.js"],
button_group: sync(["src/base/combination/group.button.js"]), button_group: ["src/base/combination/group.button.js"],
buttons: sync(["src/case/button/**/*.js"]), buttons: ["src/case/button/index.js"],
checkboxes: sync(["src/case/checkbox/**/*.js"]), checkboxes: ["src/case/checkbox/index.js"],
combos: sync(["src/case/combo/**/*.js"]), combos: ["src/case/combo/index.js"],
editors: sync(["src/case/editor/**/*.js"]), editors: ["src/case/editor/index.js"],
triggers: sync(["src/case/trigger/**/*.js"]), triggers: ["src/case/trigger/index.js"],
calendar: sync(["src/case/calendar/**/*.js"]), calendar: ["src/case/calendar/index.js"],
color_chooser: sync(["src/case/colorchooser/**/*.js"]), color_chooser: ["src/case/colorchooser/index.js"],
segment: sync(["src/case/segment/**/*.js"]), segment: ["src/case/segment/index.js"],
linear_segment: sync(["src/case/linearsegment/**/*.js"]), linear_segment: ["src/case/linearsegment/index.js"],
date: sync(["src/widget/date/**/*.js"]), date: ["src/widget/date/index.js"],
down_list: sync(["src/widget/downlist/**/*.js"]), down_list: ["src/widget/downlist/index.js"],
text_value_down_list_combo: sync(["src/widget/textvaluedownlistcombo/**/*.js"]), text_value_down_list_combo: ["src/widget/textvaluedownlistcombo/index.js"],
}; };
module.exports = { module.exports = {

Loading…
Cancel
Save