Skip to content

Commit

Permalink
Utilize tree.messages API
Browse files Browse the repository at this point in the history
Details: #11
  • Loading branch information
andreyvolokitin committed Jan 15, 2018
1 parent 7d5cece commit b194a72
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/extend.es6
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ function handleExtendsNodes(tree, options) {

const layoutPath = path.resolve(options.root, extendsNode.attrs.src);
const layoutHtml = fs.readFileSync(layoutPath, options.encoding);
let layoutTree = handleExtendsNodes(applyPluginsToTree(parseToPostHtml(layoutHtml), options.plugins), options);

let layoutTree;

tree.messages.push({
type: 'dependency',
file: layoutPath,
from: tree.options.from
});
layoutTree = handleExtendsNodes(applyPluginsToTree(parseToPostHtml(layoutHtml), options.plugins), options);
extendsNode.tag = false;
extendsNode.content = mergeExtendsAndLayout(layoutTree, extendsNode);

Expand Down

0 comments on commit b194a72

Please sign in to comment.