dpaw-brocket-prs-plugin
Version:
PRS plugin for the brocket network
49 lines (32 loc) • 1.51 kB
Markdown
title: Planning Referral System
data: 2015-11-04
---
## Overview
The plugin to PRS allows you to export the referral geometry to QGIS.
For this to work, you must have the QGIS monorail plugin installed and active.
## Usage
From the PRS side, you can export the geometry from your referral to QGIS.
Click "Export via Brocket" in the referral dropdown menu.

## Development
You can work on the Javascript code for the export plugin by getting the [source repo](https://bitbucket.org/dpaw/brocket-prs-plugin) from Bitbucket. You will need [nodejs](https://nodejs.org/) and [npm](https://docs.npmjs.com/getting-started/what-is-npm).
Now the source repo is git-based, `hg` will not work.
Get the repo.
```bash
$ git clone https://bitbucket.org/dpaw/brocket-prs-plugin
$ cd brocket-prs-plugin
```
Install dependencies.
```bash
$ npm install
```
And if you're brave, start the test server and browse to http://localhost:7011
```bash
$ npm test
```
The entry point for the source code is `./index.js` and rest of the code resides in the `src` directory.
The code is written using ES2015 but vanilla javascript will work fine.
Modules follow the CommonJS convention of `require` and `module.exports` but ES2015 modules will work too.
The transpilation, minifiying and dev server setup is managed with [Webpack](http://webpack.github.io/docs/what-is-webpack.html).
## Testing
Testing with [Mocha](https://mochajs.org/) and [Chai](http://chaijs.com/api/assert/)