Git Product home page Git Product logo

cds-launchpad-plugin's Introduction

cds-launchpad-plugin

Launchpad Plugin for demo / development / testing SAP Cloud Application Programming Model-based projects

Installation

In your project, run following command:

npm install --save-dev cds-launchpad-plugin

Usage

SAP Cloud Application Programming (CAP) Model 6.7.0 or higher

The cds-launchpad-plugin is using the SAP Cloud Application Programming Model plugin technique. Installing the plugin as a dev dependency (see installation) is sufficient to enable the plugin automatically.

Configuration

Optionally you can configure the cds-launchpad-plugin by adding following configuration to your package.json file.

"cds": {
  "launchpad": {
    "theme":"sap_horizon", // SAPUI5 Theme
    "version": "1.120.1", // SAPUI5 Version
    "basePath": "", // Path under which you want the sandbox to be served
    "appConfigPath": "", // External sandbox appconfig json file to be merged with generated appconfig
    "locale": "", // Language to be used for the sandbox environment
    "template": "" // 'legacy' (non-async launchpad, default) or 'async' (async launchpad)
  }
}

The sandbox launchpad will be served on /$launchpad, like http://localhost:4004/$launchpad

SAP Cloud Application Programming (CAP) Model 6.7.0 or lower

Have this in your server.js:

const cds = require ('@sap/cds');

/* For releases before cds 7:
replace:
cds.env.production === false
with:
process.env.NODE_ENV !== 'production'
*/
if (cds.env.production === false){
    const {cds_launchpad_plugin} = require('cds-launchpad-plugin');

    // Enable launchpad plugin
    cds.once('bootstrap',(app)=>{
        const handler = new cds_launchpad_plugin();
        app.use(handler.setup({theme:'sap_horizon', version: '1.120.1'}));
    });
}

The sandbox launchpad will be served on /$launchpad, like http://localhost:4004/$launchpad

Configuration

Call setup({...}) method with the following object (configuration object can be omitted):

{
  theme:'sap_horizon', // SAPUI5 Theme
  version: '1.99.0', // SAPUI5 Version
  basePath: '', // Path under which you want the sandbox to be served
  appConfigPath: '', // External sandbox appconfig json file to be merged with generated appconfig
  locale: '', // Language to be used for the sandbox environment
  template: '' // 'legacy' (non-async launchpad) or 'async' (async launchpad)
}

External references

Solution overview: https://blogs.sap.com/2022/03/14/a-fiori-launchpad-sandbox-for-all-your-cap-based-projects-overview/

Sample project setup: https://blogs.sap.com/2022/03/14/a-fiori-launchpad-sandbox-for-all-your-cap-based-projects-sample-project-setup/

cds-launchpad-plugin's People

Contributors

carlonnheim avatar egnedel avatar geert-janklaps avatar gregorwolf avatar nlaenger avatar schiwekm avatar the-docta 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.