A simple plugin boilerplate for localForage.
- localForage v1.4.0+
npm i localforage-plugin-boilerplate
The boilerplate makes the dummy pluginMethod()
available to all localforage instances.
localforage.pluginMethod().then(function(result) {
console.log(result);
});
- Rename the occurrences of
pluginMethod
,localforagePluginBoilerplate
and_pluginPrivateVariables
in thelib/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