1.0.0 • Published 5 years ago

gulpfile-kopano-webapp-plugin v1.0.0

Weekly downloads
2
License
AGPL-3.0
Repository
-
Last release
5 years ago

gulpfile-kopano-webapp-plugin

This package contains a gulpfile that can be used to build plugins for the Kopano WebApp. The gulpfile assumes the following plugin structure:

plugindirectory/
├── src/
|   ├── resources/
|   |   ├── css/
|   |   └── images/
|   ├── js/
|   └── php/
├── node_modules/
├── manifest.xml
├── package.json
└── package-lock.json

Installing

Install this package in your plugin by running the following command in your plugin's root folder:

npm install --save-dev gulpfile-kopano-webapp-plugin

Note: This assumes that you have also added eslint-config-kopano-webapp to your dependencies. See https://stash.kopano.io/users/rtoussaint/repos/eslint-config-kopano-webapp/browse for more information.

Building

The plugin can now be build by running npm run dist in the root directory of your plugin. This will create the plugin in the dist/ directory.

Note: The original manifest.xml file links to the dist/ directory for release and debug versions. However the manifest is copied to the dist/ directory and rewritten. This make it possible to just copy either the complete directory to a 'deployed' Kopano WebApp or the dist/ directory to the plugins directory of your Kopano WebApp installation (and renaming it of course). The latter is preferred, but the first can be useful for development purpose.

Building with make

TODO

Building with Ant

To deploy your plugin in the old fashioned way while with ant (but still using gulp), a build.xml file is created in the root directory of your plugin.

Now running ant deploy will install the dependencies, run the linters, concatenate and minify the js and css, move everything to the dist/ directory and finally copy the contents of the dist/ directory to the plugins directory of the Kopano WebApp.

Watching

Running npm run watch will start gulp in watch mode, useful for development.