SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →Reference

@ui5/sample-app

An OpenUI5 sample app set up with the UI5 CLI: ESLint, UI5 linter and UI5 Test Runner checks, a standard and a self-contained build, and a UI5 workspace for developing against local UI5 libraries.

Shows how a UI5 CLI project is set up from clone to build, not any one feature of the framework. ui5 serve runs the app; npm test runs ESLint and @ui5/linter, then starts the ui5-test-runner to execute the tests with coverage on, and its package.json lists @ui5/middleware-code-coverage among the development dependencies. ui5 build -a makes a standard preload build, and ui5 build self-contained a bundle of the application's runtime dependencies, each served from /dist by a local web server. The README also explains how a ui5-workspace.yaml lets the application be developed beside a local clone of the OpenUI5 repository, which must be UI5 1.65.0 or higher. The package is marked private in its package.json and is not on npm.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
Build and dev-server toolingUI5Build and dev-server toolingcapabilityServing an app locally and building it for deployment — proxying a backend, transpiling, bundling, and shaping the result for whatever will host it.UI5 testingUI5UI5 testingcapabilityProving a UI still works — unit tests over controllers and formatters, integration tests that drive real controls, and end-to-end runs against a served app.LintingUI5LintingcapabilityCatching in the editor what would otherwise be caught at deploy time, or not at all — problems in source code and models and in the project's configuration, found by rules rather than by review.

Who is behind it

UI5UI5OrganisationMaintains this
In the atlas: maintains 8
@UI5
maintainerAndreas KunzPersonContributes to this
In the atlas: contributes to 19
@akudev
Christian GrailPersonContributes to this
In the atlas: contributes to 3
@cgrail
Clemens MaierPersonContributes to this
In the atlas: contributes to 2
@clemai
Yavor IvanovPersonContributes to this
In the atlas: contributes to 17
@d3xter666
DomiPersonContributes to this
In the atlas: contributes to 3
@domianer
Andreas EckerPersonContributes to this
In the atlas: contributes to 3
@ecker
Florian VogtPersonContributes to this
In the atlas: contributes to 50, wrote 2
@flovogt
Lars KisselPersonContributes to this
In the atlas: contributes to 3
@larskissel
Matthias OßwaldPersonContributes to this
In the atlas: contributes to 29
@matz3
Max ReichmannPersonContributes to this
In the atlas: contributes to 10
@maxreichmann
19 contributors

What it declares

Every artifact

Type
Sample
Origin
By SAP
Use as
A reference

As a sample

Form
A reference application

Connections3

README

quoted from UI5/sample-app under Apache-2.0, read
UI5/sample-app/README.mdOn GitHub

OpenUI5 logo

sample-app

OpenUI5 sample app using the UI5 CLI.

REUSE status

Live Demo

A deployed version of the sample-app is hosted on GitHub Pages.

Prerequisites

Getting started

  1. Clone this repository and navigate into it

    git clone https://github.com/UI5/sample-app.git
    cd sample-app
  2. Install all dependencies

    npm install
  3. Start a local server and run the application (http://localhost:8080/index.html)

    ui5 serve -o index.html

Testing

  • Run ESLint code validation
    npm run lint
  • Start the UI5 Test Runner and execute the tests
    npm run test-runner
  • Run both ESLint and UI5 Test Runner
    npm test

Building

Option 1: Standard preload build
  1. Execute the build
    ui5 build -a
  2. Run the result
    1. Run a local HTTP server on the build results (/dist directory)
      (Note: This script is using the local-web-server npm module, but you can use any HTTP server for that)
      npm run serve-dist
    2. Open the app at http://localhost:8000
Option 2: Self-contained build
  1. (Optional) Remove previous build results
    rm -rf ./dist
  2. Execute the self-contained build to create a bundle with all of your applications runtime dependencies
    ui5 build self-contained -a
  3. Run the result
    1. Run a local HTTP server on the build results (/dist directory)
      (Note: This script is using the local-web-server npm module, but you can use any HTTP server for that)
      npm run serve-dist
    2. Open the app at http://localhost:8000

Working with local dependencies

For local development of your applications' dependencies (like OpenUI5 libraries) you can use UI5 Workspaces. This will allow you to make changes to those dependencies locally and see the impact in your application immediately.

Preparation

The following needs to be done just once per setup.

  1. Clone the OpenUI5 repository and navigate into it Note: The UI5 version must be 1.65.0 or higher, you can check that in the root package.json file
    git clone https://github.com/UI5/openui5.git
    cd openui5
  2. Install all dependencies (this also links all OpenUI5 libraries between each other)
    npm install
Setup UI5 Workspace

Would you like to work on the application project and one or more of its UI5 framework dependencies at the same time? We got you covered!

  1. Create a new file ui5-workspace.yaml in the root folder of the project, right next to the ui5.yaml
  2. In ui5-workspace.yaml, add the paths to the local dependencies you'd like to use from your local machine:
    specVersion: workspace/1.0
    metadata:
        name: default
    dependencyManagement:
        resolutions:
            # local path to OpenUI5. It will resolve all required libraries and transitive dependencies.
            - path: /local/path/to/openui5
  3. Start the development server with default dependency resolution
    npm run start

You can now make changes in your local OpenUI5 repository and see the impact directly when serving or building your application.

If a dependency that is listed in ui5.yaml is omitted in the resolutions section of ui5-workspace.yaml, the library is resolved in the usual way by downloading it from the registry. For more information about dependency resolutions, check here.

Non-default workspace

The workspace feature always uses the default workspace and always attempts to resolve any dependencies from it. If you'd like to use the workspace for local development but want to resolve the libraries in the usual way by default, you can name the workspace and use that name later, for example like this:

specVersion: workspace/1.0
metadata:
    name: local-dependencies # Not "default"
dependencyManagement:
    resolutions:
        - path: /local/path/to/openui5
# Starts a server with a named workspace
npm run start -- -w local-dependencies
Apache-2.0, read

Details

Sources3
Added by handdiscovered herechecked
github.com/UI5/sample-apptree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainui5, developer-experience
Contributors19
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:ui5-sample-app
JSON
/artifacts/ui5-sample-app.json
MCP
Connecting an agent