Skip to content
1000TurquoisePogs edited this page Dec 18, 2019 · 11 revisions

Plugins can have any build process desired as long as it doesn't conflict with the packaging structure. That is to say, your source code can be anywhere as long as the /web folder contains static web content, and the /lib folder contains server files, etc.

However, many plugins do follow a similar build process, which is described here. NOTE: For the following steps to work, you must have the package manager installed, NPM. To use Zowe properly, you must have the rest of the prerequisites https://github.com/zowe/zlux-app-server#0-install-prerequisites

Building web content (webClient)

  1. Set the environment variable MVD_DESKTOP_DIR to point to the absolute path of /zlux-app-manager/virtual-desktop i.e.

export MVD_DESKTOP_DIR=/{your_path}/zowe/zlux-app-manager/virtual-desktop

  1. Go to the plugin's directory. If the /webClient folder exists, go into it. If not, skip the following two steps and move onto the next section.
  2. Run npm install to install the app dependencies. If npm install is not recognized, it is probably because you do not have npm installed in the terminal you are using.
  3. Run npm run build to build the app code, which generates static content within the /web folder. Check for success (Some warnings may appear. These are usually harmless and are only problematic if the build failed). (optional)
  4. Instead of run build, you can run npm run start to build the app code, except this will compile in real-time, and as long as you do not stop the script, it will compile your app code changes as you write to them.

Building server content (nodeServer)

  1. Go to the plugin's directory. If the /nodeServer folder exists, go into it. If not, skip the following two steps and move onto the next section.
  2. Run npm install to install dependencies. Check for successful return code.
  3. Run npm run build to build, which generates content within the /lib folder. Check for success. (optional)
  4. Instead of run build, you can run npm run start to build the server code, except this will compile in real-time, and as long as you do not stop the script, it will compile your app code changes as you write to them.

Building Javascript content (*.js files)

  1. Javascript is an interpreted language, unlike Typescript, and thus does not need to be built. For most cases, reloading the page should build new code changes. For Iframes or other JS-based apps, simply closing and opening them in Zowe should have new changes take effect.

Installing

Follow the steps described here to add your built plugin to the Zowe desktop.

Packaging

(Developers) For more information on how to package your Zowe app, see the wiki here.