-
Notifications
You must be signed in to change notification settings - Fork 31
Front End Overview
The HTML templates reside in /openfecwebapp/templates/.
All of the stylesheets that control openFEC-web-app pages are maintained in the fec-style repo.
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.
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.