File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ module.exports = (options = {}) => tree => {
147147 return processStacks (
148148 processPushes (
149149 processTree ( options ) (
150- expressions ( options . expressions ) ( tree )
150+ expressions ( options . expressions ) ( tree ) , tree . messages
151151 ) ,
152152 pushedContent ,
153153 options . push
@@ -168,7 +168,7 @@ let processCounter = 0;
168168function processTree ( options ) {
169169 const filledSlots = { } ;
170170
171- return tree => {
171+ return ( tree , messages ) => {
172172 log ( `Processing tree number ${ processCounter } ..` , 'processTree' ) ;
173173
174174 if ( options . plugins . length > 0 ) {
@@ -184,6 +184,13 @@ function processTree(options) {
184184
185185 const componentPath = getComponentPath ( currentNode , options ) ;
186186
187+ if ( messages ) {
188+ messages . push ( {
189+ type : 'dependency' ,
190+ file : componentPath
191+ } ) ;
192+ }
193+
187194 if ( ! componentPath ) {
188195 return currentNode ;
189196 }
@@ -222,7 +229,7 @@ function processTree(options) {
222229 return currentNode . content || nextNode . content ;
223230 } ) ;
224231
225- nextNode = processTree ( options ) ( nextNode ) ;
232+ nextNode = processTree ( options ) ( nextNode , messages ) ;
226233
227234 // Process <fill> tags
228235 processFillContent ( nextNode , filledSlots , options ) ;
You can’t perform that action at this time.
0 commit comments