ui5-community / ui5-ecosystem-showcase

A repository showcasing the UI5 tooling extensibility to combine OSS tools for UI5 application development.
https://ui5-community.github.io/ui5-ecosystem-showcase/
Other
194 stars 93 forks source link

[cds-plugin-ui5] not supporting custom "app" folders (cds.env.folders.app) #934

Closed ghost closed 10 months ago

ghost commented 10 months ago

Right now the cds plugin only looks in the "app" folder of the CAP project as stated in the documentation: https://github.com/ui5-community/ui5-ecosystem-showcase/blob/b0c6bc10257fcacb9c4c99b4489ff20f0d991c22/packages/cds-plugin-ui5/README.md?plain=1#L5

I would like to suggest a change via PR to make it more flexible

for example: https://github.com/ui5-community/ui5-ecosystem-showcase/compare/main...nlaenger:ui5-ecosystem-showcase:main

ghost commented 10 months ago

@fabiantschirschnitz

petermuessig commented 10 months ago

Hi @nlaenger ,

thanks, that's a good catch! I would suggest to inject the cds.env as a parameter to the findUI5Modules function and just do a one liner:

module.exports = async function findUI5Modules({ cwd, cds, skipLocalApps, skipDeps }) {

    [...]

    let appDir = path.join(cwd, cds?.env?.folders?.app || "app");

WDYT? You can also create the PR for that, then I can merge and release asap...

petermuessig commented 10 months ago

The cds-plugin-ui5 version 0.7.5 now includes your feature: https://www.npmjs.com/package/cds-plugin-ui5

Thanks for the contribution 🚀