UNPKG

2.9 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. If you'd like to see a feature
8implemented, you can file an issue, but know that pull requests for small
9things like adding a line in a config file will get more attention than an
10issue asking someone else to do it.
11
12See below for [issues that have been discussed and will be rejected](#features-localforage-will-reject).
13
14# Contributing to localForage
15
16First off: thanks! Open source software (and thus all software) exists because
17of people like you. <3
18
19If you'd like to contribute to localForage, it's as simple as opening a pull
20request on GitHub. After that someone will code review your work and either
21ask you to fix any errors or merge the code into master. Here are a few tips:
22
23* **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
24* **do your work on a feature branch**: this keeps things clean and easy
25* **try to rebase master into your branch**: this keeps the commit history clean and avoids merge commits inside feature branches
26* **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
27* **run `grunt build` before you commit**: this will build out the files in the `dist/` folder and ensure your tests pass
28
29Please commit changes at the top-level folder along with your changes in the
30`src/` folder--**do not make these changes separate commits**. These are the
31built versions of `localforage.js` and `localforage.min.js`, which are
32used by bower.
33
34If you have any questions, need some help, or anything else, don't feel shy!
35The team behind this library is often available on IRC
36([irc.mozilla.org](https://wiki.mozilla.org/IRC) on the `#apps` channel).
37
38## Coding Style
39
40All 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`.)
41
42## Features localForage will reject
43
44### node.js support
45
46localForage is a browser library with a specific focus on client-side,
47offline storage. It is not a general-purpose storage library and is not meant
48to allow for the same API on the client and the server. Implementing the
49localForage API wouldn't be hard (it's just localStorage with callbacks and
50ES6 promises), but it's a job for another library.
51
52### Legacy browser support
53
54Basically this means anything before IE 8. I know there are hacky ways to
55support storage with cookies or IE Userdata or whatever, but anything worse
56than localStorage isn't worth investing into.
57
\No newline at end of file