Skip to content
This repository was archived by the owner on Dec 23, 2017. It is now read-only.

Front End Overview

christine edited this page Nov 28, 2016 · 1 revision

Templates

The HTML templates reside in /openfecwebapp/templates/.

SCSS

All of the stylesheets that control openFEC-web-app pages are maintained in the fec-style repo.

JavaScript

The JavaScript for campaign finance data tables and charts are in /static/js/modules/. It is built on jQuery, RequireJS, and sometimes Underscore. JavaScript files have to be built and compressed for any local changes to take effect, which are handled by either the npm run build-js or npm run watch commands.

Local development setup

To work on JavaScript on openFEC-web-app, make sure the fec-style repo is on your machine and up to date. Link the fec-style repo if you haven't already:

cd ~/fec-style
npm link
cd ~/openFEC-web-app
npm link fec-style

This means that openFEC-web-app will take in the styles and JavaScript from fec-style as a npm package. After fec-style has been linked, you can run the command npm run watch (on the openFEC-web-app directory) and it will continuously compile any SCSS/JS changes on fec-style as well as JS changes on openFEC-web-app as files are saved.

Clone this wiki locally