Comments (11)
Hi @geert-janklaps I can add you to one of my repo's if you like - for testing - or alternatively you can quickly setup a test project by:
- cds init <test project> && cd <test project>
- cds add tiny-sample
- Then use fiori tools app generator / template wizard to add a fiori elements app and ensure to choose the following under configure advanced options:
- Enable Typescript
Then you'll have a minimal sample where you can add this launchpad project.
from cds-launchpad-plugin.
Hi Jason, Peter,
Thanks for the tip!
Due to my unavailability today & tomorrow, I'll probably do the required changes tomorrow night / saturday. If all goes well, you should be able to use this by monday!
Cheers,
Geert-Jan
from cds-launchpad-plugin.
Hi @geert-janklaps ,
the cds-launchpad-plugin
is currently not working together with the cds-plugin-ui5
. You are relying on the existence of the files on the file system - but for the TypeScript compilation the cds-plugin-ui5
is enabling the usage of the UI5 tooling middlewares such as the ui5-tooling-transpile
. Is it necessary to create the component preload or can you make that step optional (for now) to make the classic component loading with TypeScript work? You can maybe probe the existence of the Component.js
and if it is not available just skip the generation of the component preload?
WDYT?
What I could foresee is maybe a UI5 tooling middleware which creates the component preload bundles on the fly - but it needs to have an understanding of the available resources and also if some resources are dynamically created but middlewares (in the dev server) or tasks (during the build). I think this is a bit more complicated...
BR,
Peter
from cds-launchpad-plugin.
Hi @petermuessig,
If the only issue is the component preloading, I personally don't see a reason why we couldn't make it optional as you describe.
(the initial version didn't include this feature, it is a recently introduced feature)
Do you by any chance have sample repository that I can use?
Currently I'm only using typescript for CAP in my projects (planning to do the migration to typescript for the apps as well). But don't have a project up and running. (If you don't have a sample repo, I'll setup one myself, just to buy me some time)
By the way, I'm planning to look into some additional improvements as well (e.g. the way the launchpad is initialized which is using a now deprecated method: sap.ushell.Container.createRenderer() )
Cheers,
Geert-Jan
from cds-launchpad-plugin.
Hi Jason, Peter,
I've added basic support for the cds-plugin-ui5 in version 2.0.2.
I fixed / added:
- Index page issue (apps generated by cds-plugin-ui5 were not shown)
- Support for the default routes used in cds-plugin-ui5 (based on module name)
Since the current solution is using a different route, the component-preload is not posing an issue, since this is only registered on the default cap server route. (/modulename/webapp vs /modulename)
Currently I couldn't seem to find a straight forward way to identify which mount points are registered by the cds-plugin-ui5. I see there are quite some options / levels where the default mount point can be overruled.
Maybe we should align on the best way to identify which mount points are registered in cds-plugin-ui5 so I can add full support even for customized mount points.
I'm thinking out loud, but maybe exposing the mount points for each module in an environment variable could be an option?
Cheers,
Geert-Jan
from cds-launchpad-plugin.
Hi @geert-janklaps ,
sry, I wanted to reply earlier and missed it. What you finally need to know are all the available routes, right?
Maybe a nice option would be to check the env variable for:
```process.env["cds-plugin-ui5"] === true````
And in this case you can wait for a custom event, e.g. "cds-plugin-ui5:started" which provides an array of routes?
WDYT?
BR,
Peter
from cds-launchpad-plugin.
Hi @petermuessig,
Sound goods to me! Just to make sure, the array I'd need would also need to contain the component. (to be able to identity which route is linked to which component).
Once you have such an event available, just let me know and I'll look into implementing the necessary logic in the launchpad plugin.
Cheers,
Geert-Jan
from cds-launchpad-plugin.
Is this also solved by #35 ? CC @marianfoo
from cds-launchpad-plugin.
Maybe it is solved, but I'm not sure what technical problems are still there.
from cds-launchpad-plugin.
Hi @geert-janklaps I can add you to one of my repo's if you like - for testing - or alternatively you can quickly setup a test project by:
- cds init && cd
- cds add tiny-sample
- Then use fiori tools app generator / template wizard to add a fiori elements app and ensure to choose the following under configure advanced options:
- Enable Typescript
Then you'll have a minimal sample where you can add this launchpad project.
@js1972
i added a test case for typescript app like you described above and using cds-plugin-ui5
and it works for me
see PR #37
from cds-launchpad-plugin.
This one was already working. The only case that is not covered is if you choose to use custom routes for cds-plugin-ui5. (currently only default routes are supported)
from cds-launchpad-plugin.
Related Issues (17)
- Make this project a CDS Plugin Package HOT 2
- appConfigPath in Setup is not implemented HOT 2
- update do README to reflect current version HOT 1
- Use ui5.sap.com instead of sapui5.hana.ondemand.com HOT 1
- TypeError: content.replace is not a function HOT 1
- Allow setting launchpad as default page HOT 1
- "Reuse" library support? HOT 1
- suggestion for better language support (cds.launchpad.locale)
- suggestion: supporting of crossNavigation - inbounds - hideLauncher
- plugin also loads when starting "cds mock <servicename>" HOT 1
- Changes not reflected in Launchpad HOT 1
- Tile duplicated HOT 1
- Add check that sap.app.i18n.bundleUrl is not undefined
- Section `sapux` in package.json deprecated with UI5 Tooling V3
- Adjust launchpad template to allow configuration of renderers HOT 1
- sap.app - i18n - bundleUrl not yet supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cds-launchpad-plugin.