Kerro kantasi participatory democracy UI
HTML JavaScript CSS Shell
Switch branches/tags
Nothing to show
Clone or download
Rikuoja Merge pull request #653 from City-of-Helsinki/fix/build-sourcemaps
Configure uglifyjs to build sourcemaps
Latest commit 73c820b Jul 16, 2018
Permalink
Failed to load latest commit information.
__mocks__
__tests__ Merge pull request #652 from City-of-Helsinki/improve/center-project-… Jul 11, 2018
assets Merge branch 'master' into feature/#610-poll-admin Jul 6, 2018
conf Configure uglifyjs to build sourcemaps Jul 16, 2018
deploy Container tagging fix May 30, 2018
flow-typed/npm Use _.flowRight instead of ramda's compose; remove ramda dep Nov 13, 2017
server
src
.babelrc Feature/smoke tests (#444) Nov 21, 2017
.editorconfig Add .editorconfig Feb 26, 2016
.eslintignore Upgrade (probably) safe-to-upgrade things (#393) Sep 25, 2017
.eslintrc.js
.flowconfig Start using flowtype Jun 15, 2017
.gitignore
.gitmodules Remove legacy submodules that weren't used Jun 18, 2018
.snyk fix: package.json & .snyk to reduce vulnerabilities Nov 21, 2017
.travis.yml
Dockerfile
README.md Add note about production use Feb 21, 2018
complexity.eslintrc.js Add Eslint ruleset and package command for checking code complexity Nov 17, 2017
config_dev.toml.example
package.json
postcss.config.js
test-setup.js
test-utils.js
yarn.lock Update leaflet dependencies Apr 16, 2018

README.md

Kerrokantasi UI

Build Status codecov

Kerrokantasi UI is the user interface powering kerrokantasi.hel.fi service. It is a full featured interface for both answering and creating questionnaires as supported by Kerrokantasi API.

Development installation

Prerequisites

  • Node v8 LTS
  • Yarn

Configuration

config_dev.toml is used for configuration when NODE_ENV != "production". It is in TOML-format, which for our purposes is Key=Value format.

When NODE_ENV=="production", only environment variables are used for configuration. The environment variables are named identically to the ones used in config_dev.toml. Do note that the variables are case insensitive, ie. KeRRokanTasi_aPi_bASe is a valid name. Go wild!

In the repository root there is config_dev.toml.example which contains every setting and comments explaining their use. If you only want to give kerrokantasi-ui a test, all you need to do is: mv config_dev.toml.example to config_dev.toml That will give you a partially working configuration for browsing test questionnaires in our test API.

Running development server

yarn start

No separate build step is currently available.

Other commands for development

  • yarn run dev: development mode (hot reloading and all that jazz, also broken)
  • yarn run test: run tests

Bundle size analysis is available (by way of the webpack-bundle-analyzer plugin) if the BUNDLE_ANALYZER environment variable is set.

Production installation

Production installation is very similar to a development installation, as there is no way to create a static build of kerrokantasi-ui currently. Just specify NODE_ENV=production in the environment to enable any node optimizations, although they don't really matter.