Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.29 KB

devel_frontend.md

File metadata and controls

30 lines (21 loc) · 1.29 KB

This section describes the internal structure of the Sparv frontend and can be used as a developer's guide.

The frontend is available at https://spraakbanken.gu.se/sparv/.

Requirements

  • Node v0.10.x, which should be installed through you package manager. This should by default include NPM, the node package manager.
  • Grunt, install using npm install -g grunt-cli.
  • CoffeeScript, install using npm install -g coffeescript.
  • Sass, install using npm install sass.

Frontend Configuration

The app/config.js file contains the configuration of the backend address, the address to the default settings JSON schema and also the address to Karp.

Running the Frontend

For running the frontend locally (while developing) run grunt serve. In you browser, open http://localhost:9010 to launch Sparv. While running grunt serve the CoffeeScript and Sass files are automatically compiled upon edit, additionally causing the browser window to be reloaded to reflect the new changes.

Before releasing a new version, the scripts are compiled by running grunt in the frontend directory. This will create a directory called dist which contains all the files necessary to run the frontend.