Giter VIP home page Giter VIP logo

cds-launchpad-plugin's Issues

Typescript support for UI5 app

If the ui5 apps are written in Typescript this plugin does not seem to work for me. Maybe I am missing some setting?
I use the cds-plugin-ui5 plugin which ties the ui5 build system (typescript compile etc) into cds watch. It seems the setup of cds-launchpad-plugin runs before that process kicks in and there is no Component.js yet.

sap.app - i18n - bundleUrl not yet supported

Hi @geert-janklaps,

I try to follow the best practice described in UI5ers Buzz #54: I18n with supportedLocales and fallbackLocale configuration and added the following to my manifest.json:

{
    "_version": "1.45.0",
    "sap.app": {
        "id": "environments",
        "type": "application",
        "i18n": {
            "bundleUrl": "i18n/i18n.properties",
            "supportedLocales": [
                "en"
            ],
            "fallbackLocale": "en"
        },

Unfortunately that causes this error:

ENOENT: no such file or directory, open '/app/environments/webapp/[object Object]'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at /node_modules/cds-launchpad-plugin/src/index.ts:93:31
    at Array.forEach (<anonymous>)
    at cds_launchpad_plugin.prepareAppConfigJSON (/node_modules/cds-launchpad-plugin/src/index.ts:73:25)
    at /node_modules/cds-launchpad-plugin/src/index.ts:34:34
    at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/node_modules/express/lib/router/index.js:328:13)
    at /node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/node_modules/express/lib/router/index.js:346:12)

I would suggest to look by default for:

let i18nPath = cds.root + '/' + element + '/webapp/' + manifest["sap.app"].i18n.bundleUrl;

and fallback only when empty to the current implementation. What do you think?

Best Regards
Gregor

"Reuse" library support?

Hi @geert-janklaps,

I have a "reuse library" in my project, and I'm using cds-launchpad-plugin in combination with cds-ui5-plugin.

Now when I want to to use a resource MyResource from my.namespace.library from one of my applications (my.namespace.app1), it won't be able to load that resource (because it's trying to load from
https://ui5.sap.com/resources/my/namespace/library/MyResource.js which is the last resort).

I think two things would need to be changed to enable that use case:

  1. cds-ui5-plugin should serve also libraries (as far as I understood, it does not do that at the moment).
  2. cds-launchpad-plugin needs to add resourceroots to the UI5 bootstrap element in the sandbox launchpad.

But before I open an issue over at cds-ui5-plugin and try to create corresponding pull requests on both components, I first wanted to check with you (and other potential readers) if there's another solution I might have missed.

update do README to reflect current version

Hi,

the README should be updated to reflect the current state.

Cause the setup has changed:

  • with using of the cds plugin system - the setup in server.js ist not required
  • the option/setting for the launchpad have moved to cds.env...

regards
Norbert

appConfigPath in Setup is not implemented

Hi,
I have the requirement to start the Launchpad tiles in different subdirectories.

But the appConfigPath with my own config doesn_t work.

I used this code:
app.use(handler.setup({theme:'sap_horizon', version: '1.99.0', appConfigPath: '/fiori/appconfig/fioriSandboxConfig'}));

Is it possible to implement. If not, could you please adjust

in index.js line 149
// App URL
const url = /${element.replace(cds.env.folders.app, '')}/webapp;

my element 'main-app/app/backend' is replaced to /main-app/backend, but this is wrong. It should be: /main-app/app/backend

Thank you in advance.

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.