packages/okam-build/lib/processor/helper/builtin.js
function updateReferProcessorInfo(existedProcessors, processorName, referProcessorName) {
    let currProcessor = existedProcessors[processorName];
    if (!currProcessor || currProcessor.processor) {
        return;
    }

    let referProcessorInfo = existedProcessors[referProcessorName];
    if (!referProcessorInfo) {
        return;
    }

    let deps = referProcessorInfo.deps;
    deps && !Array.isArray(deps) && (deps = [deps]);

    let oldDeps = currProcessor.deps;
    oldDeps && !Array.isArray(oldDeps) && (oldDeps = [oldDeps]);

    let old = Object.assign({}, currProcessor);
    Object.assign(currProcessor, referProcessorInfo, old, {
        refer: referProcessorName,
        deps: merge(deps || [], oldDeps || []),
        processor: referProcessorInfo.processor
    });
}
function updateReferProcessorInfo(existedProcessors, processorName, referProcessorName) {
    let currProcessor = existedProcessors[processorName];
    if (!currProcessor || currProcessor.processor) {
        return;
    }

    let referProcessorInfo = existedProcessors[referProcessorName];
    if (!referProcessorInfo) {
        return;
    }

    let deps = referProcessorInfo.deps;
    deps && !Array.isArray(deps) && (deps = [deps]);

    let oldDeps = currProcessor.deps;
    oldDeps && !Array.isArray(oldDeps) && (oldDeps = [oldDeps]);

    let old = Object.assign({}, currProcessor);
    Object.assign(currProcessor, referProcessorInfo, old, {
        refer: referProcessorName,
        deps: merge(deps || [], oldDeps || []),
        processor: referProcessorInfo.processor
    });
}
Update existed processor processor info. If the processor has been defined,
it'll skip the update.

@param {Object} existedProcessors the existed processors info
@param {string} processorName the processor name to update
@param {string} referProcessorName the refer processor