This WordPress plugin provides a method for caching theme assets via a service worker.
Перейти к файлу
Marco 1932d4fba7 Merge pull request #99 from marco-c/composer_lock
Commit composer.lock
2016-04-04 13:04:32 +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 Fix #86 - Rename normalize function 2016-03-14 13:15:28 -05: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 'prefer-source' and 'no-interaction' arguments for composer install 2016-04-04 11:52:29 +01: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
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.