This WordPress plugin provides a method for caching theme assets via a service worker.
Перейти к файлу
Marco Castelluccio be02e8b403 Add 'minimum-stability' field to composer.json 2016-04-06 14:40:26 +01:00
assets Update readme to include screenshot information 2016-03-11 09:58:57 -06:00
bin Make installer executable 2016-02-23 13:19:35 -06:00
tests Adding test for ignoreSearch 2016-03-14 13:52:20 -05:00
wp-offline-shell Merge branch 'master' of https://github.com/mozilla/wp-offline-shell into use_composer_autoload 2016-04-06 14:22:11 +01:00
.gitignore Commit composer.lock to the repo 2016-04-04 11:52:39 +01:00
.travis.yml Merge branch 'master' of https://github.com/mozilla/wp-offline-shell into new_Makefile 2016-03-14 15:35:24 +00:00
LICENSE Rebrand plugin with new name and prefixes 2016-03-08 11:30:20 -06:00
Makefile Use Composer autoloading 2016-04-04 20:19:56 +01:00
README.md Updates to make SVN friendly 2016-03-08 20:59:53 -06:00
composer.json Add 'minimum-stability' field to composer.json 2016-04-06 14:40:26 +01:00
composer.lock Update dependencies 2016-04-04 12:59:39 +01:00
karma.conf Run Chromium without sandbox 2016-03-11 13:02:18 +00:00
package.json Updating to 0.4.0 2016-03-14 13:03:10 -05:00
phpunit.xml.dist Add an update path for plugin 2016-03-04 15:35:13 -06:00
sw-tests.js Adding more efficient caching mechanism so entire caches aren't deleted for one file change 2016-03-02 12:06:24 -06:00
version-changelog.js Also update the *-db.php file on 'make release' 2016-03-14 15:31:35 +00:00

README.md

Build Status WordPress plugin WordPress

Offline Shell

A WordPress plugin for caching theme assets via a service worker for the sake of performance and offline functionality.

Build

To build the plugin, ensure you have Composer, then simply invoke composer install.

Installation and Usage

Assuming the build step completed successfully, place the wp-offline-shell directory inside your WordPress instance's wp-content/plugins directory.

With the plugin in the WordPress directory structure:

  1. Activate the plugin
  2. Navigate to the plugin's settings page
  3. Choose assets from the listing that are used most frequently (style.css is likely used on every page of the blog, for example)
  4. Save!

A service worker will then be placed within every page of the blog and select assets will be served from the service worker!

Install the plugin

Clone the repository and copy the folder wp-offline-content inside your WordPress plugins directory.

Activate the plugin from the Plugins menu in the Dashboard. Options are available to customize under the Offline content submenu in Settings.

Running tests

Install dependencies:

./bin/install-wp-tests.sh MYSQL_DATABASE_NAME MYSQL_USER MYSQL_PASSWORD localhost latest

Run tests:

make test

Run service worker tests:

make test-sw

Contribution and Bugs

Contributions are welcome! You can file pull requests or or issues at this repository.