This Boilerplate Starter Kit is a Front-end web kit and boilerplate for building web apps or small sites reflecting the GOV.UK designs patterns using Pug(Jade) and Sass / Scss
Govstrap.io is a port of the GOV.UK standard web theme to the Bootstrap framework which allows developers with working knowledge of Bootstrap to build GOV.UK related sites without learning the details of the GDS methods. This software enables the developer to take advantage of the significant investments made by GDS in accessibility and device compatibility by re-using the GDS theme.
The code was created as a by-product of the Summer 2016 http://code4health.org website update and subsequently released for re-use by others, therefore all code created for the govstrap.io project is available as Open Source software.
Please keep in mind this project is still beta, meaning things may not be working as expected or will be changed in future updates and may have some broken links whilst we develop the site.
This repo contains the http://govstrap.io website code and examples.
The site is created using apache SSI to simplify editing and management of the site. govstrap.io has also been integrated in to the http://flexibase.io CMS platform.
This project is based on a simple and fast workflow focused mainly on the front-end task. It gives a solid starting point for newcomers who wants a ready-to-deploy local environment setup. The sources used to build this project includes:
- Pug-Sass ready.
- Easy to deploy your production files
- Performance optimization: minify and concatenate JavaScript, CSS, HTML and images
- Live browser reloading with
BrowserSync
- Includes:
Normalize.css
for CSS normalizations and common bug fixesjQuery
via Bower installationBootstrap4
via Bower installationhtml5shiv
via CDNRespond
via CDNgulpfile.js
with Gulp presets
After Node.js, npm, Gulp and Bower(optional) installation, you can create a new project based on pug-sass-boilerplate-starter-kit
by doing the following:
First, clone the project:
$ git clone https://github.com/Errec/pug-sass-boilerplate-starter-kit.git <my-project-name>
or simply download from the GitHub repo
Initialize npm
on <my-project-name>
directory
$ cd <my-project-name>
$ npm install
After the installation of all requirements and its dependencies, your local web development environment is ready to run. Setup your initial files with gulp build
. This command is only necessary the first time the project is set or if the build folder is deleted.
$ gulp build
Now run your local server using the server
task
$ gulp server
This task will open the browser window usually with the URL http://localhost:3000/. Any saved changes made to the project files, will reload automatically the browser.
.
├── build/
├── fonts/ # Contains the font files used in the project
├── images/ # Contains the compressed and optimized image files
├── styles/ # Contains the concatenated/minified .css files and .map files
├── scripts/ # Contains the concatenated/minified/uglyfied .js files and normal js files
├── vendors/ # Store third party libraries (jQuery, bootstrap, font-awesome)
└── index.html # Minified html index file
All you need to do is copy the content of the build folder into your hosting account and you are set.