Invoke the specified method for each of the project's addons. @private @method _eachProjectAddonInvoke @param {String} methodName the method to invoke on each addon @param {Array} args the arguments to pass to the invoked method
(methodName, args)
| 490 | @param {Array} args the arguments to pass to the invoked method |
| 491 | */ |
| 492 | _eachProjectAddonInvoke(methodName, args) { |
| 493 | this.initializeAddons(); |
| 494 | |
| 495 | let invokeArguments = args || []; |
| 496 | |
| 497 | return this.project.addons.reduce((sum, addon) => { |
| 498 | let method = addon[methodName]; |
| 499 | if (method) { |
| 500 | let val = method.apply(addon, invokeArguments); |
| 501 | if (val) { |
| 502 | sum.push(val); |
| 503 | } |
| 504 | } |
| 505 | return sum; |
| 506 | }, []); |
| 507 | }, |
| 508 | |
| 509 | _addonPreprocessTree(type, tree) { |
| 510 | return addonProcessTree(this, 'preprocessTree', type, tree); |
nothing calls this directly
no test coverage detected
searching dependent graphs…