GithubHelp home page GithubHelp logo

zdemo_ui5_self's Introduction

OpenUI5 logo

openui5-sample-app

OpenUI5 sample app using the UI5 Tooling.

Prerequisites

Getting started

  1. Clone this repository and navigate into it

    git clone https://github.com/SAP/openui5-sample-app.git
    cd openui5-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 Karma Test Runner with the UI5 Plugin and execute the tests automatically after every change
    npm run watch
  • Run both ESLint and Karma in CI mode
    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 link them by using Yarn. This will allow you to make changes to your applications dependencies locally and see the impact in your application immediately.

Note: Currently only Yarn understands the workspace package setting used in the OpenUI5 repository. If you do not plan to work with OpenUI5 you might as well use npm. But keep in mind that linking the same module with npm and Yarn might lead to issues. Also, Yarn can't work with links created by npm and vice versa. See FAQ: What's the thing with yarn? for details.

Prerequisites

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/SAP/openui5.git
    cd openui5
  2. Install all dependencies (this also links all OpenUI5 libraries between each other)
    yarn
  3. Make all projects available as global links. Note: The OpenUI5 project uses wsrun to link all libraries with one command. See Linking Projects for general information about project linking.
    yarn run link-all

Linking

  1. In your application directory: Link the required OpenUI5 libraries
    yarn link @openui5/sap.ui.core
    yarn link @openui5/sap.m
    yarn link @openui5/themelib_sap_fiori_3

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

Unlinking

To return to using the OpenUI5 npm packages

  1. Remove the links
    yarn unlink @openui5/sap.ui.core
    yarn unlink @openui5/sap.m
    yarn unlink @openui5/themelib_sap_fiori_3
  2. Re-install the packages from the registry
    yarn

zdemo_ui5_self's People

Contributors

grknylmz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.