Giter Site home page Giter Site logo

christophercameron-ixd / static Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tomafro/static

0.0 0.0 0.0 21.78 MB

GOV.UK static files and resources

Home Page: https://docs.publishing.service.gov.uk/apps/static.html

License: MIT License

Ruby 14.91% JavaScript 65.17% HTML 4.12% CSS 15.78% Shell 0.01%

static's Introduction

Static

This application defines global templates for GOV.UK pages.

Screenshots

screenshot

Nomenclature

  • slimmer - Rack middleware for wrapping Rack applications in shared templated layouts

Technical documentation

Running the application

./startup.sh

This will start the server running on http://0.0.0.0:3013

Running Locally

If you'd like to run static locally, and keep all its asset links pointing to the same local instance, you'll need to set PLEK_SERVICE_STATIC_URI, which is the host used for static assets (even on static).

Otherwise it defaults to static.dev.gov.uk, which won't exist if you're just running this repo locally, without the rest of the GOV.UK stack.

To run this app locally, and have it point at its own assets, run it like this:

PLEK_SERVICE_STATIC_URI=0.0.0.0:3013 ./startup.sh

If you're making front end changes to static and testing them out on your development VM, you may find that it takes several minutes for changes to appear due to caching in Slimmer. One approach to speed this up is to run all of the relevant app's dependencies (including static), then start that app separately. Restarting the app should pick up the changes.

For example, to see changes made to static templates which are wrapped around feedback pages, run bowl feedback --without=feedback in one terminal and the .startup.sh script for feedback in a separate terminal. Following local edits to static, restarting just feedback should be sufficient.

Running the test suite

bundle exec rake runs the test suite.

Javascript unit tests

Tests can run in browser at /specs

Or in terminal to run only the jasmine tests you can use RAILS_ENV=test bundle exec rake spec:javascript

static's People

Contributors

phae avatar tombye avatar fofr avatar alextea avatar partiallyblind avatar edds avatar alext avatar bradwright avatar h-lame avatar kushalp avatar jordanhatch avatar richardjpope avatar jystewart avatar daibach avatar andysellick avatar futurefabric avatar benilovj avatar dependabot-support avatar nickcolley avatar dsingleton avatar fidothe avatar tijmenb avatar boffbowsh avatar alecgibson avatar steventux avatar elenatanasoiu avatar carvil avatar heathd avatar 36degrees avatar robyoung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.