https://github.com/localforage/localforage-typescript-plugin-boilerplate
A simple typescript plugin boilerplate for localForage.
https://github.com/localforage/localforage-typescript-plugin-boilerplate
Last synced: over 1 year ago
JSON representation
A simple typescript plugin boilerplate for localForage.
- Host: GitHub
- URL: https://github.com/localforage/localforage-typescript-plugin-boilerplate
- Owner: localForage
- License: other
- Created: 2017-08-13T12:25:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T14:24:24.000Z (about 6 years ago)
- Last Synced: 2025-02-09T03:27:09.581Z (over 1 year ago)
- Language: TypeScript
- Size: 23.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
localForage-typescript-plugin-boilerplate
==============================
[](https://travis-ci.org/localForage/localForage-typescript-plugin-boilerplate)
[](https://www.npmjs.com/package/localforage-typescript-plugin-boilerplate)
A simple TypeScript plugin boilerplate for [localForage](https://github.com/mozilla/localForage).
## Requirements
* [localForage](https://github.com/mozilla/localForage) v1.5.0+
## Installation
`npm i localforage-typescript-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-typescript-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.umd.js`
* Provide a simple example in the `examples/index.html`