Commit b0a9b3e8 authored by rockyl's avatar rockyl

增加自定义模块支持

parent b0177d52
......@@ -21,7 +21,7 @@ async function pack(project, options) {
}
}
async function packData(data, {getProcesses, getScripts}) {
async function packData(data, {getProcesses, getScripts, getCustoms}) {
let newData = {};
newData.options = data.options;
delete newData.options.tpl;
......@@ -29,7 +29,6 @@ async function packData(data, {getProcesses, getScripts}) {
newData.assets = data.assets;
newData.dataMapping = data.dataMapping;
newData.processes = data.processes;
newData.customs = data.customs;
let scriptIDs = [];
for (let view of newData.views) {
......@@ -74,6 +73,8 @@ async function packData(data, {getProcesses, getScripts}) {
}
}
newData.customs = data.customs && data.customs.length > 0 ? await getCustoms(data.customs) : [];
return JSON.stringify(newData);
}
......
This diff is collapsed.
......@@ -25,7 +25,7 @@ async function pack(project, options) {
}
}
async function packData(data, {getProcesses, getScripts}) {
async function packData(data, {getProcesses, getScripts, getCustoms}) {
let newData = {};
newData.options = data.options;
delete newData.options.tpl;
......@@ -33,7 +33,6 @@ async function packData(data, {getProcesses, getScripts}) {
newData.assets = data.assets;
newData.dataMapping = data.dataMapping;
newData.processes = data.processes;
newData.customs = data.customs;
let scriptIDs = [];
for (let view of newData.views) {
......@@ -78,6 +77,8 @@ async function packData(data, {getProcesses, getScripts}) {
}
}
newData.customs = data.customs && data.customs.length > 0 ? await getCustoms(data.customs) : [];
return JSON.stringify(newData);
}
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
}
}
async function packData(data, {getProcesses, getScripts}) {
async function packData(data, {getProcesses, getScripts, getCustoms}) {
let newData = {};
newData.options = data.options;
delete newData.options.tpl;
......@@ -35,7 +35,6 @@
newData.assets = data.assets;
newData.dataMapping = data.dataMapping;
newData.processes = data.processes;
newData.customs = data.customs;
let scriptIDs = [];
for (let view of newData.views) {
......@@ -80,6 +79,8 @@
}
}
newData.customs = data.customs && data.customs.length > 0 ? await getCustoms(data.customs) : [];
return JSON.stringify(newData);
}
......
This diff is collapsed.
......@@ -21,7 +21,7 @@ export async function pack(project, options) {
}
}
async function packData(data, {getProcesses, getScripts}) {
async function packData(data, {getProcesses, getScripts, getCustoms}) {
let newData = {};
newData.options = data.options;
delete newData.options.tpl;
......@@ -29,7 +29,6 @@ async function packData(data, {getProcesses, getScripts}) {
newData.assets = data.assets;
newData.dataMapping = data.dataMapping;
newData.processes = data.processes;
newData.customs = data.customs;
let scriptIDs = [];
for (let view of newData.views) {
......@@ -74,6 +73,8 @@ async function packData(data, {getProcesses, getScripts}) {
}
}
newData.customs = data.customs && data.customs.length > 0 ? await getCustoms(data.customs) : [];
return JSON.stringify(newData);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment