https://github.com/localforage/localforage-plugin-boilerplate
A jump-start for localForage plugins development
https://github.com/localforage/localforage-plugin-boilerplate
Last synced: about 1 year ago
JSON representation
A jump-start for localForage plugins development
- Host: GitHub
- URL: https://github.com/localforage/localforage-plugin-boilerplate
- Owner: localForage
- License: other
- Created: 2016-04-23T21:07:39.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-13T13:33:09.000Z (almost 9 years ago)
- Last Synced: 2025-06-21T09:06:55.378Z (about 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
localForage-plugin-boilerplate
==============================
[](https://www.npmjs.com/package/localforage-plugin-boilerplate)
A simple plugin boilerplate for [localForage](https://github.com/mozilla/localForage).
## Requirements
* [localForage](https://github.com/mozilla/localForage) v1.4.0+
## Installation
`npm i localforage-plugin-boilerplate`
## API
The boilerplate makes the dummy `pluginMethod()` available to all localforage instances.
```js
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`