srb_ui5_tools
v1.1.0
Published
Toolset of SRB Consulting Team for manufacturing brilliant UI5 apps
Downloads
4
Readme
SRB_UI5_TOOLS
UNDER CONSTRUCTION
THIS PACKAGE IS IN DEVELOPMENT STATE!
Motivation
Setting up a new SAPUI5 project can be challenging. This repo is equipped with a lot of useful tools to setup a SAPUI5 project.
What it contains
- Deployment function to deploy a ui5 app using the
nwabap-ui5uploader
library - Setup a deployment configuration file
- Migrate from our v1 deployment scripts to the new one ( the outdated version is the one where we were using the
deploy.sh
and thedeployment_config.sh
) - Add our standardized linter settings to your project
- Add our standardized prettier settings to your project
- Add our standard script to the projects
package.json
file - NodeJS script for updating the buildnumber of the UI5 manifest json file. ( Used for SRB Products )
Getting started
Prerequisites
- Install the
nwabap-ui5uploader
and add it to your node project vianpm install nwabap-ui5uploader
Add the package to your npm project via:
npm install srb_ui5_tools
Or clone the GitHub repo, and install the cloned version from your file system
npm install ./path/to/your/repo/SRB_UI5_Tools
You can also use npm link
. See the official docs https://docs.npmjs.com/cli/v8/commands/npm-link
This links a local npm package to your npm environment.
Using the package via a script
Using the package via run-func
run-func
is a node lib for running a function of a node js module directly from the command line.
This makes it possible with less development effort, to run a function of our module easily.
Example: npx run-func srb_ui5_tools deploy
This calls our modules deploy function. More details to this function later.
If you have not already installed run-func
, you can add it to your npm project with
npm install run-func
,
or install it globally in your environment with
npm install -g run-func
Features
deploy
Deploy your UI5 app to a ABAP repository server.
initDeploymentConfig
Setup a template deployment config.
initESLintConfig
Copy our standardized linting config to your project.
initPrettierConfig
Copy our standardized prettier config to your project.
migrateV1DeploymentConfig
Migrate the old style deployment config ( .sh ) to a modern JSON deployment configuration.
addScriptsToProject
Add our standardized scripts to your project.
updateBuildnumber
Update your UI5 manifest file app version.
Migrating your SRB product to use the srb_ui5_tools
- Install the
srb_ui5_tools
usingnpm install srb_ui5_tools
- Use the command
npx run-func srb_ui5_tools migrateV1DeploymentConfig
for running the migration of the V1 deployment config. - You will be asked if you want to delete the old deployment config. Confirm it with writing
yes
, to delete it. Log output of a successful execution:Migrating config file ./scripts/config/deployment_config.sh New config file written Detected that you have a outdated version of the deployment config there. Do you want to delete it? (Yes/No): yes Deleted outdated config successfully.
Missing features
- Method to add our standardized GitHub Workflows to a project