UNPKG

3.04 kBMarkdownView Raw
1# Filing issues
2
3Please
4[check the existing issues](https://github.com/mozilla/localForage/issues) to
5make sure your issue hasn't already been filed.
6
7If you have a bug to report, please file it.
8You are also encouraged to create an example (or [edit an existing one](http://codepen.io/thgreasi/pen/ojYKeE)) to showcase your issue.
9
10If you'd like to see a feature
11implemented, you can file an issue, but know that pull requests for small
12things like adding a line in a config file will get more attention than an
13issue asking someone else to do it.
14
15See below for [issues that have been discussed and will be rejected](#features-localforage-will-reject).
16
17# Contributing to localForage
18
19First off: thanks! Open source software (and thus all software) exists because
20of people like you. <3
21
22If you'd like to contribute to localForage, it's as simple as opening a pull
23request on GitHub. After that someone will code review your work and either
24ask you to fix any errors or merge the code into master. Here are a few tips:
25
26* **all drivers must have the same public API**: refer to [the API tests](https://github.com/mozilla/localForage/blob/master/test/test.api.coffee) for how we ensure this, but simply put: all drivers should share the _exact same_ outward-facing API
27* **do your work on a feature branch**: this keeps things clean and easy
28* **try to rebase master into your branch**: this keeps the commit history clean and avoids merge commits inside feature branches
29* **write tests**: if you're adding new features, _please_ write tests; likewise, if you're fixing a bug that wasn't previously caught by a test, please add one
30* **run `grunt build` before you commit**: this will build out the files in the `dist/` folder and ensure your tests pass
31
32Please commit changes at the top-level folder along with your changes in the
33`src/` folder--**do not make these changes separate commits**. These are the
34built versions of `localforage.js` and `localforage.min.js`, which are
35used by bower.
36
37If you have any questions, need some help, or anything else, don't feel shy!
38The team behind this library is often available on IRC
39([irc.mozilla.org](https://wiki.mozilla.org/IRC) on the `#apps` channel).
40
41## Coding Style
42
43All code can be tested for style by running the unit tests (`npm test`). This will make sure your code conforms to our styleguide. (You can read the rules in `.jshint` and `.jscsrc`.)
44
45## Features localForage will reject
46
47### node.js support
48
49localForage is a browser library with a specific focus on client-side,
50offline storage. It is not a general-purpose storage library and is not meant
51to allow for the same API on the client and the server. Implementing the
52localForage API wouldn't be hard (it's just localStorage with callbacks and
53ES6 promises), but it's a job for another library.
54
55### Legacy browser support
56
57Basically this means anything before IE 8. I know there are hacky ways to
58support storage with cookies or IE Userdata or whatever, but anything worse
59than localStorage isn't worth investing into.
60
\No newline at end of file