Commit 727a7e83 authored by rockyl's avatar rockyl

分离代码分离器

parent 18776cf8
......@@ -167,6 +167,8 @@ ${scripts}
* Created by rockyl on 2019-12-20.
*/
const TAG = 'zeroing-code-divider';
async function divideCode(data, {debug, compile, uglify, getProcesses, getScripts, getCustoms}) {
const processManager = new ProcessManager();
const scriptManager = new ScriptManager();
......@@ -201,7 +203,8 @@ async function divideCode(data, {debug, compile, uglify, getProcesses, getScript
let ptScript = processManager.generateCurrent();
if (compile) {
processManager.coverScripts(await compile(ptScript)); //自定义过程先编译
const result = await compile(ptScript);
processManager.coverScripts(result.code); //自定义过程先编译
}
for (let process of builtinProcesses) {
......
This diff is collapsed.
......@@ -173,6 +173,8 @@ ${scripts}
* Created by rockyl on 2019-12-20.
*/
const TAG = 'zeroing-code-divider';
async function divideCode(data, {debug, compile, uglify, getProcesses, getScripts, getCustoms}) {
const processManager = new ProcessManager();
const scriptManager = new ScriptManager();
......@@ -207,7 +209,8 @@ async function divideCode(data, {debug, compile, uglify, getProcesses, getScript
let ptScript = processManager.generateCurrent();
if (compile) {
processManager.coverScripts(await compile(ptScript)); //自定义过程先编译
const result = await compile(ptScript);
processManager.coverScripts(result.code); //自定义过程先编译
}
for (let process of builtinProcesses) {
......
This diff is collapsed.
......@@ -173,6 +173,8 @@ ${scripts}
* Created by rockyl on 2019-12-20.
*/
const TAG = 'zeroing-code-divider';
async function divideCode(data, {debug, compile, uglify, getProcesses, getScripts, getCustoms}) {
const processManager = new ProcessManager();
const scriptManager = new ScriptManager();
......@@ -207,7 +209,8 @@ ${scripts}
let ptScript = processManager.generateCurrent();
if (compile) {
processManager.coverScripts(await compile(ptScript)); //自定义过程先编译
const result = await compile(ptScript);
processManager.coverScripts(result.code); //自定义过程先编译
}
for (let process of builtinProcesses) {
......
This diff is collapsed.
......@@ -6,6 +6,8 @@ import ProcessManager from "./ProcessManager";
import ScriptManager from "./ScriptManager";
import CustomManager from "./CustomManager";
const TAG = 'zeroing-code-divider';
export async function divideCode(data, {debug, compile, uglify, getProcesses, getScripts, getCustoms}) {
const processManager = new ProcessManager();
const scriptManager = new ScriptManager();
......@@ -40,7 +42,8 @@ export async function divideCode(data, {debug, compile, uglify, getProcesses, ge
let ptScript = processManager.generateCurrent();
if (compile) {
processManager.coverScripts(await compile(ptScript)); //自定义过程先编译
const result = await compile(ptScript);
processManager.coverScripts(result.code); //自定义过程先编译
}
for (let process of builtinProcesses) {
......
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