Skip to content

tillwirth/pay-product-page

 
 

Repository files navigation

Pay Product Page

Running Locally

  • bundle install to install middleman and its dependencies
  • npm install to install the frontend dependencies
  • bundle exec middleman server - to start middleman's built in server
  • open http://localhost:4567 - to open the example in your browser

Building a Static Copy of the Site

  • bundle install
  • npm install
  • bundle exec middleman build

Check the build directory for the output.

Components

Look at the CSS for the individual components for usage examples and notes.

Releasing a Static Copy of the Site

The command line script github-release allows you to easily build an artifact containing the generated static site and publish it on GitHub in a format that makes it suitable for use as a Node.js dependency.

Using the GitHub API, the script creates a new release from master with an associated tag. On your local machine, it then builds a static version of the site (using middleman) from your working copy, adds a package.json file (which makes it a Node.js module) inside the resulting build directory, tars and gzips the build directory, then attaches the gzipped tarball as a binary to the release in GitHub, where it appears alongside the source code downloads on the releases page. This artifact is available over HTTPS and can be used as a dependency in a Node.js project.

In order to run the script, you need to declare an environment variable called GITHUB_TOKEN containing your GitHub authentication token:

GITHUB_TOKEN=xxx

Then you can run the script:

bin/github-release --version 1.0.1 publish

The --version argument specifies the version of the new release (pick something sensible based on the previous releases). This version number is used for the release version, tag name, version property in the package.json and as part of the file name for the binary.

The script is bash and has no dependencies other than curl and those necessary for middleman.

About

GOV.UK Pay product page

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 69.3%
  • CSS 19.5%
  • Shell 4.7%
  • Ruby 4.1%
  • JavaScript 2.4%