nens / waterlabel-client

Front-end for Waterlabel
http://www.waterlabel.net/
GNU General Public License v3.0
0 stars 0 forks source link

WATERLABEL-CLIENT

A Waterlabel front-end using React, Redux, Bootstrap and Leaflet.

Local installation

You'll need a fairly recent Node.js installation (v6.9.1 or higher) that includes npm. On Ubuntu you may need to install the nodejs-legacy package.

Install Yarn first if you don't have it set up already. Should be as easy as $ npm install -g yarn.

With Yarn, Node and npm installed, run:

$ yarn install

This will parse package.json and yarn.lock and will install the proper versions of all dependencies.

Building a production bundle

$ npm run build

This will run webpack in production mode. The result will be a bundle.js file in the dist/ directory.

Releasing a new bundle to Github

See Standard Version

First make a copy of deploy/auth.json.example named deploy/auth.json.

Generate a new Personal Access Token on Github first and copy that token into deploy/auth.json in the place of Your-token-that-you-created-on-github.

Then run the release command as such:

$ npm run release

If all goes well, a new release should appear on Github.

Development

If you work on this project, please submit changes via Pull Requests and follow the commit guidelines as outlined here.

These commit messages will be used to auto-generate CHANGELOG.md.

Have a look at the buck-trap README for more information about the release procedure.

Please use ESLint in your editor and set indentation to 2 spaces.

Browser development extensions

This front-end uses React and Redux. These extensions may help:

Starting the devserver

$ npm start

This will start a development server with Hot Module Replacement turned on.

It defaults to run on http://localhost:5050.

Proxy

The file server.js proxies requests to /api to another webserver. This webserver can be configured to suit your needs (ie. point to a local server).

Deployment

For a production deployment, please refer to waterlabel-site.