@sap/generator-mdk
v1.0.0-2
Published
Create a project to develop a SAP Mobile Development Kit application using a predefined template.
Maintainers
Readme
MDK Generator
This CLI tool allows developers to generate Mobile Development Kit (MDK) projects independently of the MDK development support already available in SAP Business Application Studio and Visual Studio Code.
Setup
Prerequisite
- Node 12 or higher version
Installation
Install Yeoman and generator-mdk using npm:
npm install -g [email protected] npm install -g @sap/mdk-tools npm install -g @sap/generator-mdkGenerate your new SAP Mobile Development Kit (MDK) project:
yo @sap/mdk
Prompt Generator for Standard MDK projects
yo @sap/mdk --dataFile ./test/debugData/mdkdemoprojectMin.json
yo @sap/mdk --dataFile ./test/debugData/mdkdemoprojectMin.json --tool 'mdktoolsPath'Use
dataFileoption if pass the JSON object in code.
A configure file example with minimum fields:
{
"type": "headless",
"target": "~/generator-mdk/test",
"projectName": "MDKDemo",
"template": "crud",
"services": [
{
"name": "MyService",
"path": "/",
"destination": "NorthwindV2",
"edmxPath": "./sample.xml",
"entitySets": ["Customers", "Suppliers"]
}
]
}
A configure file example with maximum fields:
{
"type": "headless",
"target": "~/generator-mdk/test",
"projectName": "MDKDemo",
"appName": "TestApplication",
"displayName": "My Application",
"fullName": "My SAP application",
"dscName": "MyApplication",
"version": "latest",
"template": "crud",
"services": [
{
"name": "MyService",
"path": "/",
"destination": "NorthwindV2",
"edmxPath": "<?xml ...>",
"entitySets": ["Customers", "Suppliers"]
}
]
}
The
edmxPathcan be OData.xmlfile path or file content. Thepathis relative to the configuration file.
