A Wordpress plugin for Watson Assistant.
Before you can work on this plugin, you need to do the following:
-
Build the Javascript app by running the following commands from the
jsdirectory:
npm install
npm run buildIn order to build a minimized file, use npm run prod instead.
- Install required PHP libraries by running one of the following commands from the root project directory:
composer install # UNIX executable
php composer.phar install # PHP executableThere are no unit tests for this plugin at the moment. A Wordpress Docker Compose file has been
provided for running the plugin on a local instance of Wordpress and manually testing features.
Simply run the following in your shell from the docker directory:
docker-compose up -dThe website can then be accessed at localhost:8000.
You must first have a Wordpress.org account with commit access to the plugin's Wordpress SVN repository. To release updates to the plugin, you must do the following
- Build the Javascript
app.jsfile by runningnpm run prodas explained above. - Increment the version number in
watson.phpand theStable TaginReadme.txt. - Add the new version to the changelog in
Readme.txt. - Copy the contents of the
watson-conversationdirectory into thetrunkortags\X.X.Xdirectory outlined in the SVN repository documentation.
The plugin description, changelog and FAQ can be changed in the Readme.txt file stored in the watson-conversation directory. All relevant Wordpress.org plugin directory documentation, including the above links, can be found here.
This directory contains the files necessary to create a test Wordpress site using docker-compose.
This directory contains the UI component of the plugin: a chat box component implemented using React.js. The commands outlined in Setup above are required to compile this React.js project into a single file. The resulting file is located at watson-conversation/app.js for the Wordpress server to load.
When a user installs this plugin, this is the directory that is placed in the wp-content/plugins directory. Once the Javascript app has been built per the instructions above, this directory contains all the files necessary for Wordpress to run the plugin.
This directory contains the plugin banner and screenshots.