Skip to content

🚨 PRIVATE BETA: This repository relies on GOV.UK Frontend packages which are currently private whilst we test with our private beta partners. You will not be able to install or run this. 🚨

License

Notifications You must be signed in to change notification settings

TechPunk316/govuk-design-system

 
 

Repository files navigation

GOV.UK Design System


⚠️ This project is still in early development, and is not yet ready for production use.


One place for service teams to find styles, components and patterns for designing government services.

Run locally

You'll need Git and Node.js installed to get this project running.

Note: You will need the active LTS (Long-term support) Node.js version for this project (as specified in .nvmrc)

Fork repository (optional)

If you're an external contributor make sure to fork this project first

Clone repository

git clone git@github.com:alphagov/govuk-design-system.git # or clone your own fork

cd govuk-design-system

Using nvm (optional)

If you work across multiple Node.js projects there's a good chance they require different Node.js and npm versions.

To enable this we use nvm (Node Version Manager) to switch between versions easily.

  1. install nvm
  2. Run nvm install in the project directory (this will use .nvmrc)

Install npm dependencies

npm install

Start a local server

This will build sources, serve pages and watch for changes.

npm start

Build

Build ./src to ./deploy/public

npm run build

Run the Sass linter

We are using the sass-lint plugin to lint the Sass files in source/stylesheets. You can run the linter from command line by running:

npm run lint

GOV.UK Frontend packages

Design System consumes GOV.UK Frontend packages via NPM. These are defined in the package.json file.


NOTE: For the time being we are consuming private packages. To access private packages, you will first need to log in to NPM with

npm login


Automated Checks

We're using GOV.UK PaaS for automated checks and production deployment.

When changes are pushed to GitHub Travis will:

  • run the tests
  • lint the Sass stylesheets in source/stylesheets
  • run the npm run build command to ensure that the site can be generated

If any of these fail, this will be reported in the GitHub status checks interface.

Automated Deployment

We're using Netlify to automate our deployment for development preview.

Master deploy

The master branch is published to govuk-design-system-preview.netlify.com.

Branch deploy

When a new branch is pushed to GitHub a preview website will be deployed. Branch deploys are published to a URL which includes the branch name as a prefix.

For example, if a branch is called staging, it will deploy to staging--govuk-design-system-preview.netlify.com.

Deploy preview

When a new pull request is raised a preview website will be deployed. A deploy generated from a pull request will building the site as it would be if the proposed changes were merged. Deploy Previews are published to a URL which has the prefix deploy-preview followed by the identifier number of the pull request.

For example, pull request #137 will automatically trigger a Deploy Preview at deploy-preview-137--govuk-design-system-preview.netlify.com. You will also be able to access the deploy preview URL from the govuk-design-system-ci's comment.

About

🚨 PRIVATE BETA: This repository relies on GOV.UK Frontend packages which are currently private whilst we test with our private beta partners. You will not be able to install or run this. 🚨

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 79.6%
  • CSS 10.3%
  • JavaScript 9.9%
  • Shell 0.2%