|
|
@@ -351,6 +351,84 @@ function createO2ConcatTask(path, isMin, thisOptions) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+function createBaseWorkConcatTask(path, isMin, thisOptions) {
|
|
|
+ gulp.task(path+".base_work : concat", function(){
|
|
|
+ var option = thisOptions || options;
|
|
|
+ var src = [
|
|
|
+ 'source/' + path + '/js/base_work_begin.js',
|
|
|
+ 'source/' + path + '/js/base.js',
|
|
|
+ 'source/o2_core/o2/widget/Common.js',
|
|
|
+ 'source/o2_core/o2/widget/Dialog.js',
|
|
|
+ 'source/o2_core/o2/widget/UUID.js',
|
|
|
+ 'source/o2_core/o2/widget/Menu.js',
|
|
|
+ 'source/o2_core/o2/widget/Toolbar.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Common.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Actions/RestActions.js',
|
|
|
+ 'source/o2_core/o2/xAction/RestActions.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Access.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Dialog.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Menu.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/UserData.js',
|
|
|
+ 'source/x_component_Template/MPopupForm.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Authentication.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Dialog.js',
|
|
|
+ 'source/o2_core/o2/xDesktop/Window.js',
|
|
|
+ 'source/x_component_Common/Main.js',
|
|
|
+ 'source/x_component_process_Work/Main.js',
|
|
|
+ 'source/x_component_Selector/package.js',
|
|
|
+ 'source/x_component_Selector/Person.js',
|
|
|
+ 'source/x_component_Selector/Identity.js',
|
|
|
+ 'source/x_component_Selector/Unit.js',
|
|
|
+ 'source/o2_core/o2/xScript/Environment.js',
|
|
|
+ 'source/o2_core/o2/xScript/Actions/ScriptActions.js',
|
|
|
+ 'source/o2_core/o2/xScript/Actions/CMSScriptActions.js',
|
|
|
+ 'source/o2_core/o2/xScript/Actions/PortalScriptActions.js',
|
|
|
+ 'source/x_component_process_Work/Processor.js',
|
|
|
+ 'source/x_component_Template/MTooltips.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',
|
|
|
+ 'source/' + path + '/js/base_work_end.js'
|
|
|
+ ];
|
|
|
+ var dest = option.dest+'/' + path + '/';
|
|
|
+ return gulp.src(src)
|
|
|
+ .pipe(concat('js/base_work.js'))
|
|
|
+ .pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
|
|
|
+ .pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
|
|
|
+ host: option.host,
|
|
|
+ user: option.user || 'anonymous',
|
|
|
+ pass: option.pass || '@anonymous',
|
|
|
+ port: option.port || 21,
|
|
|
+ remotePath: (option.remotePath || '/') + path
|
|
|
+ })))
|
|
|
+ .pipe(gulpif((option.upload == 'sftp' && option.host != ''), sftp({
|
|
|
+ host: option.host,
|
|
|
+ user: option.user || 'anonymous',
|
|
|
+ pass: option.pass || null,
|
|
|
+ port: option.port || 22,
|
|
|
+ remotePath: (option.remotePath || '/') + path
|
|
|
+ })))
|
|
|
+ .pipe(gulp.dest(dest))
|
|
|
+ .pipe(uglify())
|
|
|
+ .pipe(rename({ extname: '.min.js' }))
|
|
|
+ .pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
|
|
|
+ .pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
|
|
|
+ host: option.host,
|
|
|
+ user: option.user || 'anonymous',
|
|
|
+ pass: option.pass || '@anonymous',
|
|
|
+ port: option.port || 21,
|
|
|
+ remotePath: (option.remotePath || '/') + path
|
|
|
+ })))
|
|
|
+ .pipe(gulpif((option.upload == 'sftp' && option.host != ''), sftp({
|
|
|
+ host: option.host,
|
|
|
+ user: option.user || 'anonymous',
|
|
|
+ pass: option.pass || null,
|
|
|
+ port: option.port || 22,
|
|
|
+ remotePath: (option.remotePath || '/') + path
|
|
|
+ })))
|
|
|
+ .pipe(gulp.dest(dest))
|
|
|
+ });
|
|
|
+}
|
|
|
function getAppTask(path, isMin, thisOptions) {
|
|
|
if (path==="x_component_process_Xform"){
|
|
|
createDefaultTask(path, isMin, thisOptions);
|
|
|
@@ -360,6 +438,10 @@ function getAppTask(path, isMin, thisOptions) {
|
|
|
createDefaultTask(path, isMin, thisOptions);
|
|
|
createO2ConcatTask(path, isMin, thisOptions);
|
|
|
return gulp.series(path, path+" : concat", path+".xDesktop : concat", path+" : bundle");
|
|
|
+ }else if (path==="x_desktop") {
|
|
|
+ createDefaultTask(path, isMin, thisOptions);
|
|
|
+ createBaseWorkConcatTask(path, isMin, thisOptions);
|
|
|
+ return gulp.series(path, path+".base_work : concat");
|
|
|
}else{
|
|
|
createDefaultTask(path, isMin, thisOptions);
|
|
|
return gulp.series(path);
|