Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.03 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.03 KB

localForage-plugin-boilerplate

npm

A simple plugin boilerplate for localForage.

Requirements

Installation

npm i localforage-plugin-boilerplate

API

The boilerplate makes the dummy pluginMethod() available to all localforage instances.

localforage.pluginMethod().then(function(result) {
  console.log(result);
});

Create your plugin

  • Rename the occurrences of pluginMethod, localforagePluginBoilerplate and _pluginPrivateVariables in the lib/localforage-plugin-boilerplate.js (and the file itself) to something more appropriate for your plugin.
  • Change the respective names in:
    • README.md
    • package.json
    • rollup.config.es6.js
    • rollup.config.js
    • rollup.config.umd.js
  • Provide a simple example in the examples/index.html