1.0.1 • Published 12 months ago

@asafyos/sapui5 v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

@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

QuestionDescriptionShortcut
Choose template typeDefines the project template type-t
Project themeSet the theme of the application
Project nameDefines project name (also will be the name of the created folder)-n
NamespaceProject namespace name
Main view nameProject main view name, type is determined by template type
UI5 versionset the version of the application-v
Server hostThe host name of the server as run by ICF node
Server portThe 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

QuestionDescriptionShortcut
Choose template typeDefines the project template type-t
Project nameDefines project name (also will be the name of the created folder)-n
NamespaceProject namespace name
UI5 versionset the version of the application-v
Server hostThe host name of the server as run by ICF node
Server portThe 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

QuestionDescription
Project nameDefines project name
NamespaceProject 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

actionDescriptionCommandTask
StartRun and test your project in the local machinenpm run startnpm: start
DeployUpload the project to the servernpm 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
1.0.1

12 months ago

1.0.0

12 months ago