-
Notifications
You must be signed in to change notification settings - Fork 42
Building Plugins
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
- 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
- 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. - Run
npm install
to install the app dependencies. Ifnpm install
is not recognized, it is probably because you do not have npm installed in the terminal you are using. - 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) 5. Instead of run build, you can runnpm 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.
- 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. - Run
npm install
to install dependencies. Check for successful return code. - Run
npm run build
to build, which generates content within the/lib
folder. Check for success. (optional) 4. Instead of run build, you can runnpm 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.
- 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.
Follow the steps described here to add your built plugin to the Zowe desktop.
(Developers) For more information on how to package your Zowe app, see the wiki here.