npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cds-launchpad-plugin

v2.2.0

Published

Launchpad Plugin for demo / development / testing SAP CAP-based projects

Downloads

3,543

Readme

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),
    "modulePaths": "" // object with module paths to be used in the launchpad.html file for "sap-ushell-config"
  }
}

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)
  modulePaths: '' // object with module paths to be used in the launchpad.html file for "sap-ushell-config"
}

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/

Development

Prerequisites

  • node 18
  • pnpm

Setup

git clone https://github.com/geert-janklaps/cds-launchpad-plugin
cd cds-launchpad-plugin
pnpm install
pnpm watch
# run cds server
pnpm dev:sapux
# go to http://localhost:4004/$launchpad