# WordPress plugin

A simple wordpress pluglin to observe the operator status

## Available Scripts

`npm run env start` to start the dev environment

`npm run start` to run webpack

Backoffice reachble at: http://localhost:8888/wp-admin/

User: `admin`

Pass: `password`

## Make a production zip

`npm run build && npm run plugin-zip`

## Install wordpress stubs

Install composer php

Windows: https://getcomposer.org/doc/00-intro.md#installation-windows

In most unix distros you can add it from the repository.

You can also run the following docker command: `docker run --rm -it -v "$(pwd):/app" composer/composer install`

## SVN Guide

Credentials:

- username: `webcomtlc`
- password: **Same as wordpress.org**

Clone the remote wordpress plugin directory:

```
svn co https://plugins.svn.wordpress.org/webcom-operator-status webcom-operator-status
```

To publish a new release:

```
npm run build && npm run plugin-zip
```

Then copy in the svn repository the contents of the zip file in `trunk/`

Edit existing files (trunk)

```
svn ci -m 'COMMIT MESSAGE'
```

Note: If you have an authentication failure, specify `--username webcomtlc --password XXXX`.

Copy from trunk to tags

```
svn cp trunk tags/TAG
```

Commit the new version

```
svn ci -m 'Tagging version TAG'
```
