Skip to content

google/web-starter-kit

Web Starter Kit

Overview

Web Starter Kitis an opinionated boilerplate for web development. Tools for building a great experience across many devices andperformance oriented.Helping you to stay productive following the best practices outlined in Google'sWeb Fundamentals.A solid starting point for both professionals and newcomers to the industry.

Features

Feature Summary
Responsive boilerplate A responsive boilerplate optimized for the multi-screen web. Powered byMaterial Design Lite.You're free to use either this or a completely clean-slate viabasic.html.
Sass support CompileSassinto CSS with ease, bringing support for variables, mixins and more. (Rungulp serveorgulpfor production)
Performance optimization Minify and concatenate JavaScript, CSS, HTML and images to help keep your pages lean. (Rungulpto create an optimised version of your project to/dist)
Code Linting JavaScript code linting is done usingESLint- a pluggable linter tool for identifying and reporting on patterns in JavaScript. Web Starter Kit uses ESLint witheslint-config-google,which tries to follow the Google JavaScript style guide.
ES2015 via Babel 6.0 Optional ES2015 support usingBabel.To enable ES2015 support remove the line"only": "gulpfile.babel.js",in the.babelrcfile. ES2015 source code will be automatically transpiled to ES5 for wide browser support.
Built-in HTTP Server A built-in server for previewing your site locally while you develop and iterate
Live Browser Reloading Reload the browser in real-time anytime an edit is made without the need for an extension. (Rungulp serveand edit your files)
Cross-device Synchronization Synchronize clicks, scrolls, forms and live-reload across multiple devices as you edit your project. Powered byBrowserSync.(Rungulp serveand open up the IP provided on other devices on your network)
Offline support Thanks to our baked inService Workerpre-caching,sites deployingdistto a HTTPS domain will enjoy offline support. This is made possible bysw-precache.
PageSpeed Insights Web performance metrics showing how well your site performs on mobile and desktop (Rungulp pagespeed)

Quickstart

Downloadthe kit or clone this repository and build on what is included in theappdirectory.

There are two HTML starting points, from which you can choose:

  • index.html- the default starting point, containing Material Design layout.
  • basic.html- no layout, but still includes our minimal mobile best-practices

Be sure to look over theinstallation docsto verify your environment is prepared to run WSK. Once you have verified that your system can run WSK, check out thecommandsavailable to get started.

Web Performance

Web Starter Kit strives to give you a high performance starting point out of the box. Our median Web Page Testscoresfor the default template have aSpeed Indexof ~1100 (1000 is ideal) and a repeat-visit Speed Index of ~550 thanks to Service Worker precaching.

Browser Support

At present, we officially aim to support the last two versions of the following browsers:

  • Chrome
  • Edge
  • Firefox
  • Safari
  • Opera
  • Internet Explorer 9+

This is not to say that Web Starter Kit cannot be used in browsers older than those reflected, but merely that our focus will be on ensuring our layouts work great in the above.

Troubleshooting

If you find yourself running into issues during installation or running the tools, please check ourTroubleshootingguide and then open anissue.We would be happy to discuss how they can be solved.

A Boilerplate-only Option

If you would prefer not to use any of our tooling, delete the following files from the project:package.json,gulpfile.babel.jsand.travis.yml.You can now safely use the boilerplate with an alternative build-system or no build-system at all if you choose.

Docs and Recipes

Inspiration

Web Starter Kit is inspired byMobile HTML5 Boilerplateand Yeoman'sgenerator-gulp-webapp,having taken input from contributors to both projects during development. OurFAQsattempt to answer commonly asked questions about the project.

Contributing

Contributions, questions and comments are all welcome and encouraged. For code contributions to Web Starter Kit, please see ourContribution guidebefore submitting a pull request.Websiterelated issues should be filed on theWeb Fundamentalsissue tracker.

License

Apache 2.0
Copyright 2015 Google Inc