@asafyos/sapui5
v1.0.1
Published
CLI for sapui5 projects
Downloads
3
Readme
@asafyos/sapui5
Description
this package is an upgraded version of sapui5_gen_cli.
This package offers the same features and more!!!
Getting Started
Getting Started use the keyword sapui5, for information use
sapui5 -h
Creating new project
sapui5 init
| Question | Description | Shortcut | | :------------------- | :----------------------------------------------------------------: | :------: | | Choose template type | Defines the project template type | -t | | Project theme | Set the theme of the application | | | Project name | Defines project name (also will be the name of the created folder) | -n | | Namespace | Project namespace name | | | Main view name | Project main view name, type is determined by template type | | | UI5 version | set the version of the application | -v | | Server host | The host name of the server as run by ICF node | | | Server port | The port of the server as run by ICF node | |
Options
--no-install
- Skips auto installation (npm i) while generating
Converting SAP webIDE project to vscode project
sapui5 webide
| Question | Description | Shortcut | | :------------------- | :----------------------------------------------------------------: | :------: | | Choose template type | Defines the project template type | -t | | Project name | Defines project name (also will be the name of the created folder) | -n | | Namespace | Project namespace name | | | UI5 version | set the version of the application | -v | | Server host | The host name of the server as run by ICF node | | | Server port | The port of the server as run by ICF node | |
Options
--no-install
- Skips auto installation (npm i) while generating
Working on existing project
for convenience, commands that affect sapui5 ONLY starts with sapui5 g|generate
others starts with sapui5 add
IMPORTANT - to work on existing project, the project MUST have sapui5.settings.json in the root folder.
if the project was created with sapui5 init
command, the file should already exist.
ALL COMMANDS MUST RUN IN THE ROOT FOLDER
Adding settings file
sapui5 add settings
| Question | Description | | :----------- | :--------------------: | | Project name | Defines project name | | Namespace | Project namespace name |
Will overwrite existing settings file if exists!
Adding grunt file
sapui5 add grunt
Generating view
sapui5 g|generate view|v <name>
Generates view and its controller, type is auto selected from settings file
Generating fragment
sapui5 g|generate fragment|f <name>
Generates fragment, type is auto selected from settings file
Running a project
The project run with the help of grunt. in the package.json the scripts are defined, wich you can use to run the project.
Run tasks in the vscode to use the scripts: >Tasks: Run Task
| action | Description | Command | Task |
| :----- | :--------------------------------------------- | :-------------------------------------------------------------------- | :------------ |
| Start | Run and test your project in the local machine | npm run start
| npm: start
|
| Deploy | Upload the project to the server | npm run deploy --username=<sap_user_name> --password=<sap-password>
| npm: deploy
|
Note Before using the Deploy task, make sure to update the bsp_application_description
, package
and change_request_id
values in Gruntfile.js (grunt.initConfig -> settings -> upload).
Authors
- Saar Shalom - Original writer
- Tomer Mor - Refactor and improvments
- Asaf Yosef - Second refactor and generalizations