Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude writing of specific files for CAP applications #2032

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adding a comment
  • Loading branch information
kjose90 committed Jun 14, 2024
commit 3dd229a1d4398fb0182b5c6669dd5d0e2ad89de4
1 change: 1 addition & 0 deletions packages/fiori-elements-writer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ async function generate<T extends {}>(basePath: string, data: FioriElementsApp<T
// Extend ui5-local.yaml
const ui5LocalConfigPath = join(basePath, 'ui5-local.yaml');
if(fs.exists(ui5LocalConfigPath)) {
// ui5LocalConfigPath will be present only if app is not a CAP application
const ui5LocalConfig = await UI5Config.newInstance(fs.read(ui5LocalConfigPath));
ui5LocalConfig.addUI5Libs([ushellLib]);
fs.write(ui5LocalConfigPath, ui5LocalConfig.toString());
Expand Down
2 changes: 2 additions & 0 deletions packages/fiori-freestyle-writer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ async function generate<T>(basePath: string, data: FreestyleApp<T>, fs?: Editor)
// Add placeholder middleware so allow adding service later
const ui5LocalConfigPath = join(basePath, 'ui5-local.yaml');
if(fs.exists(ui5LocalConfigPath)) {
// ui5LocalConfigPath will be present only if app is not a CAP application
const ui5LocalConfig = await UI5Config.newInstance(fs.read(ui5LocalConfigPath));
ui5LocalConfig.addFioriToolsProxydMiddleware({});
fs.write(ui5LocalConfigPath, ui5LocalConfig.toString());
Expand All @@ -111,6 +112,7 @@ async function generate<T>(basePath: string, data: FreestyleApp<T>, fs?: Editor)
// Extend ui5-local.yaml with additional UI5 lib
const ui5LocalConfigPath = join(basePath, 'ui5-local.yaml');
if(fs.exists(ui5LocalConfigPath)) {
// ui5LocalConfigPath will be present only if app is not a CAP application
const ui5LocalConfig = await UI5Config.newInstance(fs.read(ui5LocalConfigPath));
ui5LocalConfig.addUI5Libs([ushellLib]);
fs.write(ui5LocalConfigPath, ui5LocalConfig.toString());
Expand Down
1 change: 1 addition & 0 deletions packages/odata-service-writer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ async function generate(basePath: string, service: OdataService, fs?: Editor): P
// ui5-local.yaml
ui5LocalConfigPath = join(dirname(paths.ui5Yaml), 'ui5-local.yaml');
if (fs.exists(ui5LocalConfigPath)) {
// ui5LocalConfigPath will be present only if app is not a CAP application
ui5LocalConfig = await UI5Config.newInstance(fs.read(ui5LocalConfigPath));
ui5LocalConfig.addFioriToolsProxydMiddleware({ backend: [service.previewSettings as ProxyBackend] });
}
Expand Down