tasks/deploy/parse.js
function parseExtend (ast) {
    for (let i = 0, max = ast.body.length; i < max; i++) {
        let node = ast.body[i];

        // Search for extend('Parent', 'Child');
        if (isExpressionStatement(node) && isCallExpression(node.expression) && node.expression.callee.name === 'extend') {
            node = node.expression;

            let parent = node.arguments[0].value;
            let child = node.arguments[1].value;

            createHierarchyNode(parent);
            createHierarchyNode(child);

            // Link child to parent.
            hierarchy[parent].children.push(child);

            // Link parent to child.
            hierarchy[child].parent = parent;

            return true;
        }
    }

    return false;
}
function parseExtend (ast) {
    for (let i = 0, max = ast.body.length; i < max; i++) {
        let node = ast.body[i];

        // Search for extend('Parent', 'Child');
        if (isExpressionStatement(node) && isCallExpression(node.expression) && node.expression.callee.name === 'extend') {
            node = node.expression;

            let parent = node.arguments[0].value;
            let child = node.arguments[1].value;

            createHierarchyNode(parent);
            createHierarchyNode(child);

            // Link child to parent.
            hierarchy[parent].children.push(child);

            // Link parent to child.
            hierarchy[child].parent = parent;

            return true;
        }
    }

    return false;
}
function parseExtend ( ast ) { for ( let i = 0 , max = ast . body . length ; i < max ; i ++ ) { let node = ast . body [ i ] ; // Search for extend('Parent', 'Child'); if ( isExpressionStatement ( node ) && isCallExpression ( node . expression ) && node . expression . callee . name === 'extend' ) { node = node . expression ; let parent = node . arguments [ 0 ] . value ; let child = node . arguments [ 1 ] . value ; createHierarchyNode ( parent ) ; createHierarchyNode ( child ) ; // Link child to parent. hierarchy [ parent ] . children . push ( child ) ; // Link parent to child. hierarchy [ child ] . parent = parent ; return true ; } } return false ; }
Search for top level extend invocation and store parent and child
modules as hierarchical nodes.

@function parseExtend
@param {Object} ast
@return {Boolean}
@api private
Search for top level extend invocation and store parent and child modules as hierarchical nodes .