Setting up your development environment
Setting up your development environment
Before you follow the development tutorials for creating a Zowe™ CLI plug-in, follow these steps to set up your environment.
Prerequisites#
Initial setup#
To create your development space, you will clone and build zowe-cli-sample-plugin from source.
Before you clone the repository, create a local development folder named zowe-tutorial. You will clone and build all projects in this folder.
Branches#
There are two branches in the repository that correspond to different Zowe CLI versions. You can develop two branches of your plug-in so that users can install your plug-in into @latest or @zowe-v1-lts CLI. Developing for both versions will let you take advantage of new core features quickly and expose your plug-in to a wider range of users.
The master branch of Sample Plug-in is compatible with the @zowe-v1-lts version of core CLI (Zowe LTS release).
The master branch of Sample Plug-in is also compatible with the @latest version of core CLI (Zowe Active Development release) at this time.
For more information about the versioning scheme, see Maintainer Versioning in the Zowe CLI repository.
Clone zowe-cli-sample-plugin and build from source#
Clone the repository into your development folder to match the following structure:
zowe-tutorial└── zowe-cli-sample-pluginFollow these steps:
cdto yourzowe-tutorialfolder.git clone https://github.com/zowe/zowe-cli-sample-plugincdto yourzowe-cli-sample-pluginfolder.git checkout masternpm installnpm run build
(Optional) Run the automated tests#
We recommend running automated tests on all code changes. Follow these steps:
cdto the__tests__/__resources__/propertiesfolder.- Copy
example_properties.yamltocustom_properties.yaml. - Edit the properties within
custom_properties.yamlto contain valid system information for your site. cdto yourzowe-cli-sample-pluginfoldernpm run test
Next steps#
After you complete your setup, follow the Installing the sample plug-in tutorial to install this sample plug-in to Zowe CLI.