Skip to content

nsabri1/whitehall

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whitehall

Whitehall is deployed in two modes:

Live examples (frontend)

Running the Application

Use GOV.UK Docker to run any commands that follow.

Traditionally, the two sides of Whitehall are available on different domains in development, which reflect their counterparts in production:

While this usually results in different routing behaviour, in development all routes can be accessed from either domain, although the redirect behaviour may differ.

Nomenclature

  • Govspeak A variation of Markdown used throughout whitehall as the general publishing format

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

You can use the GOV.UK Docker environment to run the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.

Shared mustache templates

The shared mustache templates must be compiled for JavaScript and functional tests to pass.

bundle exec rake shared_mustache:compile
bundle exec rake shared_mustache:clean

Shared mustache templates are generated and stored in app/assets/javascripts/templates.js.

In absence of this generated template, shared mustache inlines mustache templates in <script> blocks on the page, which enables developers to see changes to mustache without compiling. If this generated template is checked-in, shared mustache uses this file instead of inlining templates. Hence, we don't check-in this file.

Running the test suite

# run all the test suites
bundle exec rake

Javascript unit tests can also be run separately:

# run all the JavaScript tests
bundle exec rake test:javascript

To run or debug individual JavaScript tests, try viewing them in your browser. Start the app as you would normally, and then go to /teaspoon/default.

Further documentation

See the docs/ directory.

Licence

MIT License

Packages

No packages published

Languages

  • Ruby 81.9%
  • HTML 9.3%
  • JavaScript 3.9%
  • SCSS 3.2%
  • Gherkin 1.5%
  • Shell 0.1%
  • Other 0.1%