material-design-lite/README.md

137 lines
6.0 KiB
Markdown
Raw Normal View History

2014-06-12 20:23:11 +04:00
# Google Web Starter Kit
2014-04-07 12:45:18 +04:00
2014-06-16 14:05:24 +04:00
> A starting point for multi-device web development
2014-04-16 17:26:21 +04:00
2014-05-16 13:59:52 +04:00
## Overview
2014-04-16 18:12:57 +04:00
2014-06-19 17:18:32 +04:00
[Web Starter Kit](http://developers.google.com/web/starter-kit) is 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 & aligned with the best practices outlined in Google's [Web Fundamentals](http://developers.google.com/web/fundamentals).
2014-04-16 18:12:57 +04:00
2014-05-27 13:27:36 +04:00
## Features
2014-06-16 18:03:08 +04:00
* Mobile-optimized HTML boilerplate
2014-06-19 16:50:10 +04:00
* Responsive multi-device layout
2014-06-05 18:26:05 +04:00
* Visual component style guide
2014-06-16 18:03:08 +04:00
* [gulp.js](http://gulpjs.com) build tooling *(optional)*
2014-05-27 13:27:36 +04:00
* LiveReload
2014-06-16 18:03:08 +04:00
* Cross-device synchronization of clicks, scrolls, navigation, and form-filling
2014-05-27 13:27:36 +04:00
* Image optimization
* JavaScript minification and optimization
* CSS optimization
2014-06-12 20:23:11 +04:00
* HTML minification
* PageSpeed performance reporting
* CSS autoprefixing
2014-05-24 18:48:00 +04:00
2014-06-18 12:29:41 +04:00
2014-05-23 23:02:58 +04:00
## Quickstart
2014-06-16 18:03:08 +04:00
[Download](http://github.com/google/web-starter-kit/archive/master.zip) the kit or clone this repository and build on what we include in the `app` directory.
2014-06-19 16:54:24 +04:00
We provide 2 HTML starting points, from which you can choose:
2014-05-27 13:27:36 +04:00
- `index.html` - the default starting point, containing layout and a slide-out menu
2014-06-16 18:03:08 +04:00
- `basic.html` - includes no layout.
2014-06-18 12:29:41 +04:00
## Tooling
If you would like to use the optional tooling we provide, make sure your system has [Node](http://nodejs.org), [Ruby](https://www.ruby-lang.org/), [Gulp](http://gulpjs.com) and the [Sass gem](http://sass-lang.com/install) installed.
2014-06-18 12:29:41 +04:00
2014-06-18 12:54:50 +04:00
### Node
Let's check to see if you already have Node installed. Bring up a terminal and type `node -v`. If Node responds, and if it shows a version at or above v0.10.x, proceed to checking if you have Ruby installed too. If you require Node, go to [NodeJS.org](http://nodejs.org/) and click on the big green Install button.
2014-06-18 12:45:29 +04:00
### Ruby
Bring up a terminal and type `ruby -v`. If Ruby responds, and if it shows a version number at or above 1.8.7 then type `gem --version`. If you don't see any errors, proceed to installing the Sass gem. If you require Ruby, it can be installed from the [Ruby downloads](https://www.ruby-lang.org/en/downloads/) page.
2014-06-18 12:54:50 +04:00
### Sass gem
Bring up a terminal and type `sass -v`. If Sass is installed it should return a version number at or above 3.3.x. If you don't see any errors, proceed to the Gulp installation. If you need to install Sass, see the command-line instructions on the [Sass installation](http://sass-lang.com/install) page.
### Gulp
2014-06-18 12:45:29 +04:00
Bring up a terminal and type `gulp -v`. If Gulp is installed it should return a version number at or above 3.5.x. If you don't see any errors, proceed to the Gulp commands section. If you need to install Gulp, open up a terminal and type in the following:
2014-05-23 23:02:58 +04:00
```sh
$ npm install --global gulp
```
2014-06-18 13:48:28 +04:00
This will install Gulp globally. Depending on your user account, you may need to gain elevated permissions using `sudo` (i.e `sudo npm install --global gulp`). Next, install the local dependencies Web Starter Kit requires:
```sh
2014-06-16 18:03:08 +04:00
$ npm install
```
2014-05-23 23:02:58 +04:00
That's it! You should now have everything needed to use the Gulp tools in Web Starter Kit.
2014-06-19 16:50:10 +04:00
### Gulp Commands
You can now use Gulp with the following commands to stay productive during development:
2014-06-19 16:50:10 +04:00
#### Watch For Changes & Automatically Refresh Across Devices
```sh
$ gulp serve
2014-06-19 16:50:10 +04:00
```
2014-05-23 23:02:58 +04:00
2014-06-19 16:50:10 +04:00
This outputs an IP address you can use to locally test and another that can be used on devices connected to your network.
2014-06-16 18:03:08 +04:00
2014-06-19 16:50:10 +04:00
### Build & Optimize
```sh
2014-06-16 18:03:08 +04:00
$ gulp
2014-05-23 23:02:58 +04:00
```
2014-04-16 18:12:57 +04:00
2014-06-19 16:50:10 +04:00
Build and optimize the current project, ready for deployment. This includes linting as well as image, script, stylesheet and HTML optimization and minification.
#### Performance Insights
```sh
$ gulp pagespeed
```
Runs the deployed (public) version of your site against the [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) API to help you stay on top of where you can improve.
2014-06-16 14:05:24 +04:00
## Web Performance
2014-05-16 13:59:52 +04:00
2014-06-16 14:26:01 +04:00
Web Starter Kit strives to give you a high performance starting point out of the box and we actively work on delivering the best [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) score and frame-rate possible.
2014-06-19 18:22:40 +04:00
In terms of CSS, opting to just use the minimal layout (main.css, h5bp.css) weighs in at ~7KB before modifications are made. Opting to use the Style Guide styles (the default) will take this up to ~39KB. It is your choice which path makes the most sense for your project, however notes on excluding Style Guide styles are in our Gulpfile.
2014-06-16 18:03:08 +04:00
## Browser Support
2014-06-16 14:26:01 +04:00
At present, we officially aim to support the following browsers:
* IE10, IE11, IE Mobile 10
2014-06-16 14:26:01 +04:00
* FF 30, 31
* Chrome 34, 35
* Safari 7, 8
* Opera 23, 24
* iOS Safari 7, 8
* Opera Coast
* Android / Chrome 4.4, 4.4.3
* Blackberry 1.0
2014-06-16 18:03:08 +04:00
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.
2014-06-06 14:55:13 +04:00
2014-06-18 12:40:48 +04:00
## Troubleshooting
If you find yourself running into issues during installation or running the tools, please check our [Troubleshooting](https://github.com/google/web-starter-kit) guide and then open an [issue](https://github.com/google/web-starter-kit/issues). We would be happy to discuss how they can be solved.
2014-06-18 12:40:48 +04:00
2014-06-19 18:22:40 +04:00
## A Boilerplate-only Option
2014-06-19 17:18:32 +04:00
If you would prefer not to use any of our tooling, delete the following files from the project: `package.json`, `gulpfile.js`, `.jshintrc`. You can now safely use the boilerplate with an alternative build-system or no build-system at all if you choose.
2014-06-06 14:55:13 +04:00
## Inspiration
2014-06-16 18:03:08 +04:00
Web Starter Kit is inspired by [Mobile HTML5 Boilerplate](http://html5boilerplate.com/mobile/) and Yeoman's [generator-gulp-webapp](https://github.com/yeoman/generator-gulp-webapp), having taken input from contributors to both projects during development.
2014-06-06 16:06:29 +04:00
2014-06-16 14:14:04 +04:00
## Contributing
2014-06-16 18:03:08 +04:00
Contributions, questions and comments are all welcome and encouraged. For code contributions, please see our [Contribution guide](https://github.com/google/web-starter-kit/wiki/Contributing) before submitting a patch.
2014-06-16 14:14:04 +04:00
2014-06-06 16:06:29 +04:00
## License
Apache 2.0
2014-06-06 16:06:29 +04:00
Copyright 2014 Google Inc