generator-dmcpodplugin-local
v1.1.1
Published
This generator scaffolds a SAP Digital Manufacturing Cloud POD Plugin
Downloads
777
Maintainers
Keywords
Readme
generator-dmcpodplugin-local
By Using this yomen generator you can create SAP DMC POD Plugins easy and can also run locally
Installation
First, install Yeoman and generator-dmcpodplugin-local using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-dmcpodplugin-local
Prerequisites
Keep below configurations handy before generating the templete code
User Email
email with access to sap dmchost
your sap dmc host address. ex: 'yourhost.execution.eu20.dmc.cloud.sap'cf endpoint url
cloud foundary endpoint url. you can get from your BTP subaccount pagemanufacturing-execution-integration server url
you can find it in servece key configuration filepublic-api-endpoint
you can find it in servece key configuration file under uaa sectionauthorization token url
you can find it in servece key configuration file under uaa section as 'url'clientid
you can find it in servece key configuration file under uaa section as 'clientid'clientsecret
you can find it in servece key configuration file under uaa section as 'clientsecret'
Generating Your Project
To create a new project using this generator, follow these steps:
Open your terminal or command prompt.
Run the generator using the following command:
yo dmcpodplugin-local
- The generator will prompt you to answer questions. Provide the required information, and it will generate the template code based on your responses.
Answer all the promts to generate the template code.
(optional)Installing build and deploy dependencies for vs code
if you are using BTP for developing the plugin this section is completely optional as BTP already have build and deploy tools preinstalled.
if you are using local system and vs code, then you need to install below dependecies to build the plugin and deploy it to BTP Space.
steps for Windows Users
- open command promt
- check choco exist in windows by running
choco -v
command - if exist run below command in Power shell to install make. in case not exist download and install choco from official website
- run
choco install make
to install make
steps for Mac Users
- Open terminal
- Install make by running
brew install make
Common steps
- Download and Install clound foundary cli from official git repo
- Install dependency mbt and multiapps
npm install -g mbt
cf install-plugin multiapps
- Create new Folder and Open it in Vs code
- Open new terminal and run below command and answer all the promts to generate the template code
yo dmcpodplugin-local
- Once the template is ready, open terminal and run
npm run start
. this will start the application in localhost. - To Build the App, run
npm run build
. This will build the app and genrate new .mtar file in 'mta_archives' folder - Before deploying the app, we have to login to cloud foundary. So run
npm run login
command and give your password and then select your org and space. you can default the org and space by mentioning addtional arguments to command in package.json file like below. for more commands check cf docs
{
.......
"scripts":{
.................
"login":"cf login -a https://api.cf.eu10.hana.ondemand.com/ -u [email protected] -o <your org> -s <your dev space>"
...................
}
......
}
- run
npm run deploy
to deploy the plugin to BTP Space. - you can run build and deploy commands together using
npm run bd
command. - Please follow the blog to configure the plugin in SAP DMC.
Note: cf login session is valid until you kill the terminal. So you don't need to run npm run login
command everytime you deploy the app.
License
his generator is open-source software and is provided under the Apache License 2.0. For the full license details, please refer to the LICENSE file included with this generator.
About the Author
Author: Subrahmanyam Pampana
Contact: [email protected]
About Subrahmanyam Pampana:
Subrahmanyam Pampana is a software engineer with a passion for developing tools and utilities that make developers' lives easier.This Yeoman generator was created as a result of his experience in working with SAP DMC and the desire to simplify the plugin creation process. This is the Extention to the dmcpodplugin generator created by kevinhunter12 with local development support.
For more information or support, please contact Subrahmanyam Pampana