code-gov-front-end
Code.gov — America’s Home for Open Source Projects from the Federal Governmen
Last updated 4 months ago by sarassassin .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install code-gov-front-end 
SYNC missed versions from official npm registry.

Code.gov - Unlocking the potential of the Federal Government’s software.

Build Status Code Climate Test Coverage

Introduction

Code.gov is a website promoting good practices in code development, collaboration, and reuse across the U.S. Government. Code.gov provides tools and guidance to help agencies implement the Federal Source Code Policy. It also includes an inventory of government custom code to promote reuse between agencies and provides tools to help government and the public collaborate on open source projects.

To learn more about the project, check out this blog post.

Code.gov is an open source project, so we invite your contributions, be it in the form of code, design, or ideas.

Contributing

Here’s how you can help contribute to code.gov:

Getting Started

After you have cloned this repo, you can use npm install to install all of the project’s dependencies.

You can then run the server using npm run start.

By default, the development server will listen on http://localhost:8080/. You can change the default port by setting the PORT environment variable before starting the server (for example, PORT=3000 npm start).

Specifying an API Key

The app uses the API key provided in the site.json by default. If you want to override that, specify an CODE_GOV_API_KEY environmental variable. Here's an example:

CODE_GOV_API_KEY=l87sfdi7ybc2bic7bai8cb2i176c3b872tb3 npm run start

You can sign up for an API key at developers.code.gov.

File Structure

The directories in src are organized around the pillars of React, along with several additional custom file types. When creating new files, be sure to add your file and any necessary templates, styles, and tests to a directory dedicated to your new file in the appropriate place.

Style Guide

The bulk of the CSS for this application is at Style Guide repository so that we can more easily keep things consistent and deploy changes more quickly.

You'll need to clone/download the Style Guide repository to get started.

If you need to make CSS changes, make them within this directory and commit them to that repository.

For more instructions on how to make changes, view the readme inside of the Style Guide repository.

Changes to the Policy Guide

The code for the Policy Guide section of the site is located in the code-gov-fscp-react-component repo. Any changes or issues related to the Policy Guide should be made in that repository.

Changes to the About Page

The code for the About section of the site is located in the code-gov-about-page repo. Any changes or issues related to the About section should be made in that repository.

Testing

Unit testing is done using the jest framework with enzyme.

Use npm run test to run unit tests a single time. This will generate a code coverage report.

Use npm run test-watch to run unit tests continuously, re-running each time a file is saved. By default only files changed since the last commit will be ran, follow the command line prompt for customizing how tests are ran. Snapshot tests can be updated while running this command, by pressing u to updated them.

Note: console.log/warn/error are mocked in unit tests and will not print anything to avoid cluttering the command line. Use a different logging, such as console.info for debugging while running tests

Deployment

Read about how to publish to Github pages, Federalist and elsewhere here

Bundle analysis

https://federalist-proxy.app.cloud.gov/preview/gsa/code-gov-front-end/federalist-bundle-analysis/report.html

Deploying Arbitrary Branch

Coming soon!

Generating License Data

To update the dependency_licenses.json file, run npm run licenses.

Configuration

For documentation on how to configure code-gov-front-end, go here.

Questions?

If you have questions, please feel free to send us an email.

License

As stated in CONTRIBUTING:

[..] this project is in the worldwide public domain (in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication).

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

Current Tags

  • 0.0.8                                ...           latest (4 months ago)

2 Versions

  • 0.0.8                                ...           4 months ago
  • 0.0.7                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |