This WordPress plugin provides a method for caching theme assets via a service worker.
Перейти к файлу
Marco Castelluccio 85e8e0081f Also update the *-db.php file on 'make release' 2016-03-14 15:31:35 +00:00
bin Make installer executable 2016-02-23 13:19:35 -06:00
tests Tests should include the built plugin 2016-03-11 12:47:02 +00:00
wp-offline-shell Use a constant to hold the current version of the plugin 2016-03-14 15:31:18 +00:00
.gitignore Ignore build directory 2016-03-11 11:42:57 +00:00
.travis.yml Don't run composer in .travis.yml because it's automatically executed by the Makefile 2016-03-11 12:38:13 +00:00
LICENSE Rebrand plugin with new name and prefixes 2016-03-08 11:30:20 -06:00
Makefile Remove 'generate-pot' from .PHONY targets 2016-03-11 13:01:57 +00:00
README.md Updates to make SVN friendly 2016-03-08 20:59:53 -06:00
composer.json Import Makefile from wp-web-push plugin 2016-03-11 11:42:48 +00:00
karma.conf Rebrand plugin with new name and prefixes 2016-03-08 11:30:20 -06:00
package.json Fix #81 - Prevent normalize/referrer from bricking SW 2016-03-10 16:48:20 -06: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.