Skip to content
Merged

3.0 #20

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

27 changes: 27 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contributing

[Read the Contributing Guide](http://js-data.io/docs/contributing).

## Support

[Find out how to Get Support](http://js-data.io/docs/support).

## Community

[Explore the Community](http://js-data.io/docs/community).

### Have write access?

To cut a release:

1. Checkout master
1. Bump version in `package.json` appropriately
1. Run `npm run release`
1. Update `CHANGELOG.md` appropriately
1. Commit and push changes, including the `dist/` folder
1. Make a GitHub release
- set tag name to version
- set release name to version
- set release body to changelog entry for the version
- attach the files in the `dist/` folder
1. `npm publish .`
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(delete this line) GitHub Issues are NOT for support questions.
(delete this line) GitHub Issues ARE for bug reports, feature requests, and other issues.
(delete this line) Find out how to Get Support here: http://js-data.io/docs/support.

<your detailed, discussable, actionable, and helpful text goes here>

Thanks!
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)

- [ ] - `npm test` succeeds
- [ ] - Pull request has been squashed into 1 commit
- [ ] - I did NOT commit changes to `dist/`
- [ ] - Code coverage does not decrease (if any source code was changed)
- [ ] - Appropriate JSDoc comments were updated in source code (if applicable)
- [ ] - Approprate changes to js-data.io docs have been suggested ("Suggest Edits" button)
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ coverage/

npm-debug.log
junit/
dist/karma.start.js
dist/karma.start.js
doc/
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Jason Dobry <jason.dobry@gmail.com> Jason Dobry <jmdobry@users.noreply.github.com>
36 changes: 0 additions & 36 deletions .npmignore

This file was deleted.

8 changes: 8 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is the official list of js-data-rethinkdb project authors.
#
# Names are formatted as:
# Name or Organization <email address>
#
# The email address is not required for organizations.
#
Jason Dobry <jason.dobry@gmail.com>
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
##### 3.0.0-beta.1 - 30 April 2016

Official v3 beta release

###### Breaking changes
- How you must now import in ES2015:

```js
import LocalStorageAdapter from 'js-data-localstorage'
const adapter = new LocalStorageAdapter()
```
or
```js
import {LocalStorageAdapter, version} from 'js-data-localstorage'
console.log(version)
const adapter = new LocalStorageAdapter()
```

- How you must now import in ES5:

```js
var JSDataLocalStorage = require('js-data-localstorage')
var LocalStorageAdapter = JSDataLocalStorage.LocalStorageAdapter
var adapter = new LocalStorageAdapter()
```

- Moved some `dist` files to `release` to reduce noise

###### Other
- Upgraded dependencies
- Improved JSDoc comments
- Now using js-data JSDoc template

##### 3.0.0-alpha.7 - 18 March 2016

###### Backwards compatible API changes
- Added count and sum methods

##### 3.0.0-alpha.6 - 10 March 2016

###### Other
- Now using js-data-repo-tools
- Now using js-data-adapter

##### 3.0.0-alpha.5 - 26 February 2016

- Couple of fixes

##### 3.0.0-alpha.4 - 23 February 2016

- Improved find, destroy, and update methods
- Upgraded to js-data-adapter-tests@2.0.0-alpha.6

##### 3.0.0-alpha.3 - 23 February 2016

- Upgraded dependencies
- Updated Readme

##### 3.0.0-alpha.2 - 13 February 2016

- Now making use of JSData.utils.forEachRelation

##### 3.0.0-alpha.1 - 13 February 2016

- Added support for `raw` option
- Added lifecycle hooks

##### 2.3.2 - 12 December 2015

###### Backwards compatible bug fixes
Expand Down
24 changes: 0 additions & 24 deletions CONTRIBUTING.md

This file was deleted.

6 changes: 6 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is the official list of js-data-rethinkdb project contributors.
#
# Names are formatted as:
# Name <email address>
#
Jason Dobry <jason.dobry@gmail.com>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2015 Jason Dobry
Copyright (c) 2014-2016 js-data-localstorage project authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
134 changes: 27 additions & 107 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,127 +1,47 @@
<img src="https://raw.githubusercontent.com/js-data/js-data/master/js-data.png" alt="js-data logo" title="js-data" align="right" width="64" height="64" />
<img src="https://raw.githubusercontent.com/js-data/js-data/master/js-data.png" alt="js-data logo" title="js-data" align="right" width="96" height="96" />

## js-data-localstorage [![Slack Status][sl_b]][sl_l] [![npm version][npm_b]][npm_l] [![Circle CI][circle_b]][circle_l] [![npm downloads][dn_b]][dn_l] [![Coverage Status][cov_b]][cov_l] [![Codacy][cod_b]][cod_l]
# js-data-localstorage

[![Slack Status][sl_b]][sl_l]
[![npm version][npm_b]][npm_l]
[![Circle CI][circle_b]][circle_l]
[![npm downloads][dn_b]][dn_l]
[![Coverage Status][cov_b]][cov_l]

localStorage adapter for [js-data](http://www.js-data.io/).

To get started, visit __[http://js-data.io](http://www.js-data.io/docs/js-data-localstorage)__.

Tested on IE9, Chrome 46, Firefox 41 & Safari 7.1 using
<img src="https://raw.githubusercontent.com/js-data/js-data-localstorage/master/bs.jpg" alt="bs logo" title="browserstack" width="150" height="35" style="vertical-align: middle" />

### API Documentation
[DSLocalStorageAdapter](http://www.js-data.io/docs/dslocalstorageadapter)

### Demo
[https://js-data-localstorage.firebaseapp.com/](https://js-data-localstorage.firebaseapp.com/)

### Quick Start
`npm install --save js-data js-data-localstorage` or `bower install --save js-data js-data-localstorage`.

Load `js-data-localstorage.js` after `js-data.js`.

```js
var adapter = new DSLocalStorageAdapter();

var store = new JSData.DS();
store.registerAdapter('localstorage', adapter, { default: true });

// "store" will now use the localstorage adapter for all async operations
```

You can also provide a custom storage medium (it just needs to implement the `localStorage` API):

```js
var memory = {};

// Turn js-data-localstorage into an in-memory adapter
var memoryAdapter = new DSLocalStorageAdapter({
storage: {
getItem: function (key) {
return memory[key];
},
setItem: function (key, value) {
return memory[key] = value;
},
removeItem: function (key) {
delete memory[key];
}
}
});
## Links

// Turn js-data-localstorage into a sessionStorage adapter
var sessionAdapter = new DSLocalStorageAdapter({
storage: sessionStorage
});
```
* [Quick start](http://www.js-data.io/docs/home#quick-start) - Get started in 5 minutes
* [Guides and Tutorials](http://www.js-data.io/docs/home) - Learn how to use JSData
* [`LocalStorageAdapter` Guide](http://www.js-data.io/docs/js-data-localstorage) - Learn how to use `LocalStorageAdapter`
* [API Reference Docs](http://api.js-data.io) - Explore components, methods, options, etc.
* [Community & Support](http://js-data.io/docs/community) - Find solutions and chat with the community
* [General Contributing Guide](http://js-data.io/docs/contributing) - Give back and move the project forward
* [Contributing to js-data-localstorage](https://github.com/js-data/js-data-localstorage/blob/master/.github/CONTRIBUTING.md)

### Changelog
[CHANGELOG.md](https://github.com/js-data/js-data-localstorage/blob/master/CHANGELOG.md)

### Community
- [Slack Channel][sl_l] - Better than IRC!
- [Announcements](http://www.js-data.io/blog)
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
- [Issues](https://github.com/js-data/js-data-localstorage/issues) - Found a bug? Feature request? Submit an issue!
- [GitHub](https://github.com/js-data/js-data-localstorage) - View the source code for js-data.
- [Contributing Guide](https://github.com/js-data/js-data-localstorage/blob/master/CONTRIBUTING.md)

### Contributing

First, support is handled via the [Slack Channel][sl_l] and the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions there.

When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy.

- good - Your versions of js-data, js-data-localstorage, etc., relevant console logs/error, code examples that revealed the issue
- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or [bin](http://jsbin.com/?html,output) that demonstrates the issue
- best - A Pull Request that fixes the issue, including test coverage for the issue and the fix

[Github Issues](https://github.com/js-data/js-data-localstorage/issues).

#### Submitting Pull Requests

1. Contribute to the issue/discussion that is the reason you'll be developing in the first place
1. Fork js-data-localstorage
1. `git clone git@github.com:<you>/js-data-localstorage.git`
1. `cd js-data-localstorage; npm install;`
1. Write your code, including relevant documentation and tests
1. Run `npm test` (build and test)
1. Your code will be linted and checked for formatting, the tests will be run
1. The `dist/` folder & files will be generated, do NOT commit `dist/*`! They will be committed when a release is cut.
1. Submit your PR and we'll review!
1. Thanks!

### License
## License

The MIT License (MIT)

Copyright (c) 2014-2015 Jason Dobry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Copyright (c) 2014-2016 js-data-http project authors

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
* [LICENSE](https://github.com/js-data/js-data-localstorage/blob/master/LICENSE)
* [AUTHORS](https://github.com/js-data/js-data-localstorage/blob/master/AUTHORS)
* [CONTRIBUTORS](https://github.com/js-data/js-data-localstorage/blob/master/CONTRIBUTORS)

[sl_b]: http://slack.js-data.io/badge.svg
[sl_l]: http://slack.js-data.io
[npm_b]: https://img.shields.io/npm/v/js-data-localstorage.svg?style=flat
[npm_l]: https://www.npmjs.org/package/js-data-localstorage
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-localstorage/master.svg?style=flat
[circle_l]: https://circleci.com/gh/js-data/js-data-localstorage/tree/master
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-localstorage.svg?style=flat
[circle_l]: https://circleci.com/gh/js-data/js-data-localstorage
[dn_b]: https://img.shields.io/npm/dm/js-data-localstorage.svg?style=flat
[dn_l]: https://www.npmjs.org/package/js-data-localstorage
[cov_b]: https://img.shields.io/coveralls/js-data/js-data-localstorage/master.svg?style=flat
[cov_l]: https://coveralls.io/github/js-data/js-data-localstorage?branch=master
[cod_b]: https://img.shields.io/codacy/b8e46008e6ad45159b7a6927dbfd66c3.svg
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-localstorage/dashboard
[cov_b]: https://img.shields.io/codecov/c/github/js-data/js-data-localstorage.svg?style=flat
[cov_l]: https://codecov.io/github/js-data/js-data-localstorage
Loading