UI5 / UI5/cli

Serve application projects listed as project dependencies in /resources

Open
#45 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
511
Forks
83
Avg merge
1d 5h
Merged PRs (30d)
55

Description

Expected Behavior

In some use cases, it is desired to use multiple ui5 components in a shared environment (for instance loading an application component appB file during runtime once a tile was clicked in appA). This is currently possible with HTML5 / ui5 applications that are deployed in a SCP account, in conjunction with a configuration in neon-app.json.

Current Behavior

As of now, ui5 application projects won’t be served in /resources when running ui5 serve in a ui5 root project, even when they contain an ui5.yaml descriptor file and are listed as dependencies.

Steps to reproduce the issue

Suppose the following structure of two ui5 application projects:

my-root-app/
    \_ node_modules/
    \_ webapp/
    \_ ui5.yaml
    \_ package.json

openui5-sample-app
    \_ node_modules/
    \_ webapp/
    \_ ui5.yaml
    \_ package.json

A global link of the openui5-sample app is created:

cd openui5-sample-app
npm link 

The sample app is added as a dependency

cd my-root-app
npm link openui5-sample-app
npm install 

The ui5-sample-app is made known in the root project:

	<script id="sap-ui-bootstrap" type="text/javascript"
		src="resources/sap-ui-core.js"
		data-sap-ui-theme="sap_belize"
		data-sap-ui-libs="sap.m"
		data-sap-ui-bindingSyntax="complex"
		data-sap-ui-compatVersion="edge"
		data-sap-ui-preload="async"
		data-sap-ui-resourceroots='{
			"my.app": "./",
			"sap.ui.demo.todo": "/resources/sap/ui/demo/todo"
		}'>
	</script>

However, when running ui5 serve in my-root-app, requests that point to the openui5-sample-app will fail.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ui5 serve entry point and trace how dependencies containing ui5.yaml and webapp are discovered from package.json. Reproduce the linked openui5-sample-app setup, then follow requests under /resources and compare them with the neon-app.json behavior described in the issue. Done means application projects listed as dependencies are served and their resource URLs resolve from the root project.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.