From 9eccae0d91b2ac5c2b39ea7e47335e3d77430473 Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Sun, 17 Jun 2018 23:37:44 +0200 Subject: [PATCH] Apply extensions found in root project --- lib/projectPreprocessor.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/projectPreprocessor.js b/lib/projectPreprocessor.js index 7bb274ee4..ff2e69791 100644 --- a/lib/projectPreprocessor.js +++ b/lib/projectPreprocessor.js @@ -65,7 +65,15 @@ class ProjectPreprocessor { await this.dependencyLookahead(project, project.dependencies); } - await this.loadProjectConfiguration(project); + const {extensions} = await this.loadProjectConfiguration(project); + if (extensions && extensions.length) { + // Project contains additional extensions + // => apply them + // TODO: Check whether extensions get applied twice in case depLookahead already processed them + await Promise.all(extensions.map((extProject) => { + return this.applyExtension(extProject); + })); + } this.applyShims(project); if (this.isConfigValid(project)) { await this.applyType(project); @@ -232,6 +240,7 @@ class ProjectPreprocessor { // Enhance project with its configuration Object.assign(configuredProject, config); + return configuredProject; }); return {extensions: extensionProjects};