Преглед изворни кода

修复gulp打包路径错误

huqi пре 5 година
родитељ
комит
733a6e115f
2 измењених фајлова са 19 додато и 11 уклоњено
  1. 11 6
      gulpfile.js
  2. 8 5
      o2web/gulpfile.js

+ 11 - 6
gulpfile.js

@@ -533,7 +533,8 @@ function concat_Style(){
             return cb();
         }
         var content = file.contents.toString();
-        name = ".."+file.path.replace(process.cwd(), "").replace(/\\/g, "/").substring("/source".length);
+        var name = file.path.replace(process.cwd(), "").replace(/\\/g, "/")
+        name = ".."+name.substring(name.indexOf("/source")+7);
         content = "var csskey = encodeURIComponent(\""+name+"\");\no2.widget.css[csskey]="+content;
 
         file.contents = new Buffer.from(content);
@@ -551,7 +552,8 @@ function build_concat_basework_style(){
         "o2web/source/o2_core/o2/widget/$Tab/form/css.wcss",
         "o2web/source/x_component_process_Xform/$Form/default/doc.wcss",
         "o2web/source/o2_core/o2/widget/$Toolbar/documentEdit/css.wcss",
-        "o2web/source/o2_core/o2/widget/$Toolbar/documentEdit_side/css.wcss"
+        "o2web/source/o2_core/o2/widget/$Toolbar/documentEdit_side/css.wcss",
+        "o2web/source/x_component_process_Xform/$Form/default/css.wcss"
     ])
         .pipe(concat_Style())
         .pipe(concat('js/base_work_style_temp.js'))
@@ -586,6 +588,8 @@ function build_concat_basework_body() {
         'o2web/source/x_desktop/js/base_concat_head.js',
         'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
 
+        'o2web/source/x_desktop/js/base_work_style_temp.js',
+
         'o2web/source/o2_core/o2/widget/Common.js',
         'o2web/source/o2_core/o2/widget/Dialog.js',
         'o2web/source/o2_core/o2/widget/UUID.js',
@@ -624,6 +628,9 @@ function build_concat_basework_body() {
         'o2web/source/o2_core/o2/xScript/Environment.js',
         'o2web/source/x_component_Template/MTooltips.js',
         'o2web/source/x_component_Template/MSelector.js',
+
+        'o2web/source/x_desktop/js/base_work_actions_temp.js',
+
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js',
         'o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.js',
         'o2web/source/o2_core/o2/xAction/services/x_cms_assemble_control.js',
@@ -631,8 +638,6 @@ function build_concat_basework_body() {
         'o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js',
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.js',
 
-        'o2web/source/' + path + '/js/base_work_actions_temp.js',
-
         'o2web/source/x_desktop/js/base.js'
     ];
     var dest = 'target/o2server/servers/webServer/x_desktop/js/';
@@ -726,14 +731,14 @@ function build_concat_baseportal_body() {
         'o2web/source/o2_core/o2/xScript/Actions/PortalScriptActions.js',
         'o2web/source/o2_core/o2/xScript/PageEnvironment.js',
 
+        'o2web/source/x_desktop/js/base_portal_actions_temp.js',
+
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js',
         'o2web/source/o2_core/o2/xAction/services/x_cms_assemble_control.js',
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.js',
         'o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js',
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.js',
 
-        'o2web/source/x_desktop/js/base_portal_actions_temp.js',
-
         'o2web/source/x_desktop/js/base.js'
     ];
     var dest = 'target/o2server/servers/webServer/x_desktop/js/';

+ 8 - 5
o2web/gulpfile.js

@@ -394,7 +394,9 @@ function concat_Style(){
             return cb();
         }
         var content = file.contents.toString();
-        name = ".."+file.path.replace(process.cwd(), "").replace(/\\/g, "/").substring("/source".length);
+        //name = ".."+file.path.replace(process.cwd(), "").replace(/\\/g, "/").substring("/source".length);
+        var name = file.path.replace(process.cwd(), "").replace(/\\/g, "/")
+        name = ".."+name.substring(name.indexOf("/source")+7);
         content = "var csskey = encodeURIComponent(\""+name+"\");\no2.widget.css[csskey]="+content;
 
         file.contents = new Buffer.from(content);
@@ -490,6 +492,9 @@ function createBaseWorkConcatBodyTask(path, isMin, thisOptions) {
             'source/o2_core/o2/xScript/Environment.js',
             'source/x_component_Template/MTooltips.js',
             'source/x_component_Template/MSelector.js',
+
+            'source/' + path + '/js/base_work_actions_temp.js',
+
             'source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js',
             'source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.js',
             'source/o2_core/o2/xAction/services/x_cms_assemble_control.js',
@@ -497,8 +502,6 @@ function createBaseWorkConcatBodyTask(path, isMin, thisOptions) {
             'source/o2_core/o2/xAction/services/x_query_assemble_surface.js',
             'source/o2_core/o2/xAction/services/x_organization_assemble_personal.js',
 
-            'source/' + path + '/js/base_work_actions_temp.js',
-
             'source/' + path + '/js/base.js'
         ];
         var dest = option.dest+'/' + path + '/';
@@ -637,14 +640,14 @@ function createBasePortalConcatBodyTask(path, isMin, thisOptions) {
             'source/o2_core/o2/xScript/Actions/PortalScriptActions.js',
             'source/o2_core/o2/xScript/PageEnvironment.js',
 
+            'source/' + path + '/js/base_portal_actions_temp.js',
+
             'source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js',
             'source/o2_core/o2/xAction/services/x_cms_assemble_control.js',
             'source/o2_core/o2/xAction/services/x_organization_assemble_control.js',
             'source/o2_core/o2/xAction/services/x_query_assemble_surface.js',
             'source/o2_core/o2/xAction/services/x_organization_assemble_personal.js',
 
-            'source/' + path + '/js/base_portal_actions_temp.js',
-
             'source/' + path + '/js/base.js'
         ];
         var dest = option.dest+'/' + path + '/';