[go: nahoru, domu]

Skip to content

Latest commit

 

History

History

templates

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
<!-- To make changes, edit templates/README.hbs, not this file. -->
[![Travis Build Status][travis-image]][travis-url]
[![AppVeyor Build status][appveyor-image]][appveyor-url]
[![Dependency Status][dependency-image]][dependency-url]
[![Dev Dependency Status][dev-dependency-image]][dev-dependency-url]

# Welcome to Workbox

Workbox is a suite of helper libraries for service workers and progressive web
apps that lets you implement precaching in a manner of minutes. Its features
support runtime caching, routing, offline analytics, background syncing, and
more.

## A service worker in two minutes

Use [sw-cli](sw-cli) to add a service worker to an existing project in under two
minutes. 

## A build script in ten minutes

Generate a service worker in your build process
using [sw-build](sw-build).

## Much more

Go beyond the basics. If you'd like to use the Workbox libraries, and you
already have your own service worker, then checkout
[sw-lib](sw-lib) which lets
you add to what you've already got.

If you've been using Workbox for a while, or you're
ambitious, you can delve into its more advanced features. Browse the
[recipes section](recipes), try the [examples](examples), or look up
something in the [mobules reference](reference-docs/stable/latest/).

## Installing a library

Each library is installed separately using the command line [as listed below](#the-libraries). To use a particular library:

1. Install the library. For example:

   `npm install --save-dev sw-lib`
2. Copy the library's JavaScript and map files to your serving directory. 

   `cp node_modules/sw-lib/build/* app/`
3. Import the library to your service worker file. For example:

   `importScripts('sw-lib.min.js');`

## The Libraries

All of the libraries are described below. Each has an _About_ page with basic usage instructions and a _Demo_ directory with an example. The main page of the documentation is [here](https://googlechrome.github.io/sw-helpers/#main).

{{#each projects}}
### {{name}}

[![Build Status](https://travis-shields.appspot.com/shield/GoogleChrome/sw-helpers/master/PROJECT%3D%22{{name}}%22)][travis-url]

{{description}}

{{#if installCmd}}
**Install**: `{{installCmd}}`
{{else}}
**Install**: `npm install --save-dev {{name}}`
{{/if}}

{{#if hasRefDocs}}**Learn More**: [About](https://googlechrome.github.io/sw-helpers/reference-docs/stable/latest/module-{{name}}.html){{/if}}{{#if hasDemo}} •
                [Demo Code](https://github.com/GoogleChrome/sw-helpers/tree/master/packages/{{name}}/demo){{/if}}

{{/each}}

## External Contributions

Please read the [guide to contributing](https://googlechrome.github.io/sw-helpers/contributing.html)
prior to filing any pull requests.

## License

Copyright 2016 Google, Inc.

Licensed under the [Apache License, Version 2.0](LICENSE) (the "License");
you may not use this file except in compliance with the License. You may
obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[npm-url]: https://npmjs.org/package/sw-helpers
[npm-image]: https://badge.fury.io/js/sw-helpers.svg
[travis-url]: https://travis-ci.org/GoogleChrome/sw-helpers
[travis-image]: https://travis-ci.org/GoogleChrome/sw-helpers.svg?branch=master
[appveyor-image]: https://ci.appveyor.com/api/projects/status/4ct8ph4d34c5ifnw?svg=true
[appveyor-url]: https://ci.appveyor.com/project/gauntface/sw-helpers
[dependency-url]: https://david-dm.org/GoogleChrome/sw-helpers/
[dependency-image]: https://david-dm.org/GoogleChrome/sw-helpers/status.svg
[dev-dependency-url]: https://david-dm.org/GoogleChrome/sw-helpers?type=dev
[dev-dependency-image]: https://david-dm.org/GoogleChrome/sw-helpers/dev-status.svg