code: function getTreeResources(node) {
    var resources = {childrenCss: [], childrenJs: [], subChildrenCss: [], subChildrenJs: []};
  
    // Add css and js of node children then dedupe
    if (node.children) {
      node.children.forEach(function(subNode) {
        var subResources = getTreeResources(subNode);
        resources.childrenJs = utilApi.joinArray(resources.childrenJs, [subNode.path]);
        resources.childrenCss = utilApi.joinArray(resources.childrenCss, subNode.styles);
        resources.subChildrenCss = utilApi.joinArray(resources.subChildrenCss, subResources.childrenCss);
        resources.subChildrenJs = utilApi.joinArray(resources.subChildrenJs, subResources.childrenJs);
        resources.subChildrenCss = utilApi.joinArray(resources.subChildrenCss, subResources.subChildrenCss);
        resources.subChildrenJs = utilApi.joinArray(resources.subChildrenJs, subResources.subChildrenJs);
      });
    } else {
  
      // Add current node css and js then dedupe
      resources.childrenCss = utilApi.joinArray(resources.childrenCss, node.styles);
      resources.childrenJs = utilApi.joinArray(resources.childrenJs, [node.path]);
  
    }
  
    return resources;
  }
docs: Retrieves CSS and JS files from tree of scripts in a flattened order.
  
  This is recursive.
  
  @method getTreeResources
  @param {Object} node The node from where to start
  @param {String} node.path The file path
  @param {Array} node.styles The list of css / scss file paths
  @return {Object} An object with:
  - **childrenCss** The list of children CSS files
  - **childrenJs** The list of children CSS files
  - **subChildrenCss** The list of sub children CSS files
  - **subChildrenJs** The list of sub children JS files
  @private