From 8642de6695efd49bc0e1b4e907497a82241bc90d Mon Sep 17 00:00:00 2001 From: Pieter Janssens Date: Tue, 11 Jul 2023 12:58:15 +0200 Subject: [PATCH] fix: support single app in ./app (#763) --- packages/cds-plugin-ui5/cds-plugin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/cds-plugin-ui5/cds-plugin.js b/packages/cds-plugin-ui5/cds-plugin.js index 47715561a..803d0486b 100644 --- a/packages/cds-plugin-ui5/cds-plugin.js +++ b/packages/cds-plugin-ui5/cds-plugin.js @@ -47,6 +47,14 @@ cds.on("bootstrap", async function bootstrap(app) { } }); + // look for a single app if no apps were found in the app directories + if(appDirs.length === 0) { + const d = path.join(process.cwd(), "app"); + if (fs.existsSync(path.join(d, "ui5.yaml"))) { + appDirs.push(d); + } + } + // lookup the UI5 dependencies const pkgJson = require(path.join(process.cwd(), "package.json")); const deps = [];