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.
#
Prequisites#
Initial setupTo 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.
#
BranchesThere 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 either @latest
or @lts-incremental
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 lts-incremental
branch of Sample Plug-in is compatible with the @lts-incremental
version of core CLI (Zowe Stable release). The master
branch of Sample Plug-in is compatible with @latest
version of core CLI (Zowe Active Development release).
For more information about the versioning scheme, see Maintaner Versioning in the Zowe CLI repository.
#
Clone zowe-cli-sample-plugin and build from sourceClone the repository into your development folder to match the following structure:
Follow these steps:
cd
to yourzowe-tutorial
folder.git clone https://github.com/zowe/zowe-cli-sample-plugin
cd
to yourzowe-cli-sample-plugin
folder.git checkout lts-incremental
npm install
npm run build
#
(Optional) Run the automated testsWe recommend running automated tests on all code changes. Follow these steps:
cd
to the__tests__/__resources__/properties
folder.- Copy
example_properties.yaml
tocustom_properties.yaml
. - Edit the properties within
custom_properties.yaml
to contain valid system information for your site. cd
to yourzowe-cli-sample-plugin
foldernpm run test
#
Next stepsAfter you complete your setup, follow the Installing the sample plug-in tutorial to install this sample plug-in to Zowe CLI.