Hello all,
I'm developing a Fiori Launchpad Plug-in and I intend to put its repository in a CD pipeline soon. Like a UI5 app, Launchpad Plugins also have a recommendation to Provide a Component Preload file for runtime (Plug-in Development Guildelines on Help Portal).
The problem: WebIDE neither provides a UI5-cli or Grunt file to build Preload by tooling when creating a new FLP Plug-in project.
Question: Anyone out there had success to build preload for Launchpad Plug-in by tooling? Any hints would be helpful.
I'm currently trying to make it buildable in UI5-tooling based on files that work fine for UI5 apps. I had to do a minor change in resources\configuration\paths property since FLP Plug-in have everything on root folder, unlike a UI5 app that puts them on webapp. I'm doing this build test at GitLab pipeline with this ui5yaml.txt and this packagejson.txt (renamed both to txt to allow upload) with a fresh clean FLP project with the commands:
npm install --global @ui5/cli
npm install
ui5 build
The build fails precisely at task generateComponentPreload with a bunch of Unexpected token error (job log exceeds 4MB). This can't be a error from plug-in itself because it was just created from wizard, and works without errors when testing, and both files for UI5-cli looks OK for me.
Best regards
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
If anyone finds this question, my definitive solution was something I said in comments: Change project layout to a better one, which I blogged/documented here at the time. Both UI5 Builder and Grunt worked on that new layout.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to create two files in the project folder:
1. package,json see https://launchpad.support.sap.com/#/notes/0002801814
2. Gruntfile.js:
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-build");
grunt.registerTask("default", [ "clean", "lint", "build" ]);
};
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It really built a preload, but had some flaws (used a minimal package.json to check):
I lost this notification and on meantime I changed default Plugin project directory layout to ressemble a Normal app (component/manifest inside webapp folder). With that structure the Grunt built without skipping tasks.
Thanks
I have same problem . Are there any solution ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I reached one temporary solution for UI5 tooling: change project layout to be like a normal app: create webapp folder and move Component/manifest to it. It also required some minor changes to everything works and successfully built with a common ui5.yaml for applications. A fix on Builder is needed to work with root folder projects, I'll open a issue on GitHub.
Gruntfile works (at some point) but its issues are also circumvented by changing project layout, which I do recommend (keep things a bit more organized).
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.