I just read on Golem, that Google launched a boilerplate for web applications. This toolkit is based on the Google Web Fundamentals.
This article will introduce the Web Fundamentals and the Google Web Starter Kit and after that heading over to how easy-install it in Ubuntu 14.04 LTS using Docker. This process will enable you to get the Web Starter Kit running without tinkering around with the packages in Ubuntu and will serve you directly with content from a gulp instance.
About Web Fundamentals
- Multi-Device Tools, such as a
- Workflows to publish for multi devices,
- debbuging and testing through Chrome Developer Tools for multiple devices
- and a web starter kit
- Flexible and responsive layouts to serve various devices
- Fluid design pattern
- Viewport sizing and how to set-up breaking points and media queries
- Forms and user inputs that are touch enabled
- Tools to measure the page speed (through Google Page Insight)
- Image, audio and video optimizations and best practices. For instance using SVG for icons.
The Web Fundamentals are connected with the Udacity course „CS256, Mobile Web Development“ that was held by Google employees first time in early 2014.
Google Web Starter Kit
„a starting point for multi-screen web development. It encompasses opinionated recommendations on boilerplate and tooling for building an experience that works great across multiple devices. We help you stay productive and aligned with the best practices outlined in Google’s Web Fundamentals.“
It includes the following features:
- Mobile-optimized HTML boilerplate
- Responsive multi-device layout
- Visual component style guide
- gulp.js build tooling (optional)
- Cross-device synchronization of clicks, scrolls, navigation, and form-filling (thanks to BrowserSync)
- Image optimization
- CSS minification and optimization
- HTML minification
- PageSpeed Insights performance reporting
- CSS auto-prefixing
In the getting started section of the page the general set-up is described. To ease this process, I set-up a Dockerfile, that is presented below.
Dockerfile to set-the environment up
I just created a Dockerfile to run the environment in Ubuntu 14.04 and to set-up the following tools:
- Open SSH Server
- SASS gem
Here is, what I created so far as Dockerfile
# Dockerfile for setting up the Google Web Starter Kit # Current version: v3 FROM ubuntu:14.04 MAINTAINER Sven Seiler <firstname.lastname@example.org> RUN apt-get update RUN apt-get -y upgrade RUN apt-get install -y software-properties-common RUN add-apt-repository ppa:chris-lea/node.js RUN apt-get update RUN apt-get install -y nodejs RUN npm install -g npm RUN apt-get install -y ruby RUN apt-get install -y git ## needed for GULP RUN apt-get install -y libfreetype6 libfreetype6-dev RUN apt-get install -y libfontconfig RUN apt-get install -y python-pip RUN pip install --user freetype-py==1.0 RUN gem install sass RUN npm install gulp-uncss --save-dev RUN npm install --global gulp RUN mkdir /data RUN cd /data && git clone https://github.com/google/web-starter-kit.git RUN cd /data/web-starter-kit && npm install #RUN cd /data/web-starter-kit/app && gulp RUN apt-get update RUN apt-get install -y openssh-server RUN mkdir -p /var/run/sshd RUN mkdir -p /var/log/supervisor RUN echo 'root:webstarterkit' |chpasswd #RUN /usr/sbin/sshd -D RUN apt-get install -y supervisor RUN touch /etc/supervisor/conf.d/supervisord.conf RUN echo "