Skip to content

Commit b34406d

Browse files
committed
Stable Version 1.1.0.
Fixes #7 Fixes #8 Closes #6
1 parent 4c110dd commit b34406d

16 files changed

+812
-581
lines changed

.jshintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"node": false,
33
"browser": true,
4-
"es5": true,
54
"esnext": true,
65
"bitwise": true,
76
"camelcase": true,

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
##### 1.1.0 - 26 March 2015
2+
3+
###### Backwards compatible bug fixes
4+
- #7 - Should not be saving relations (duplicating data)
5+
- #8 - Need to use removeCircular
6+
7+
###### Other
8+
- #6 - Convert to ES6
9+
110
##### 1.0.1 - 25 February 2015
211

312
###### Backwards compatible bug fixes
4-
- #7 - Does not properly throw error in find() (like other adapters) when the item cannot be found
13+
- #4 - Does not properly throw error in find() (like other adapters) when the item cannot be found
514

615
##### 1.0.0 - 03 February 2015
716

CONTRIBUTING.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Contributing Guide
22

3-
First, feel free to contact me with questions. [Mailing List](https://groups.io/org/groupsio/jsdata). [Issues](https://github.com/js-data/js-data-firebase/issues).
3+
First, support is handled via the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions there.
4+
5+
When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy.
6+
7+
- good - Your versions of js-data, js-data-localstorage, etc., relevant console logs/error, code examples that revealed the issue
8+
- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or [bin](http://jsbin.com/?html,output) that demonstrates the issue
9+
- best - A Pull Request that fixes the issue, including test coverage for the issue and the fix
10+
11+
[Github Issues](https://github.com/js-data/js-data-firebase/issues).
12+
13+
#### Pull Requests
414

515
1. Contribute to the issue that is the reason you'll be developing in the first place
616
1. Fork js-data-firebase

Gruntfile.js

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* js-data-firebase
3-
* http://github.com/js-data/js-data-firebase
3+
* https://github.com/js-data/js-data-firebase
44
*
5-
* Copyright (c) 2014 Jason Dobry <http://www.js-data.io/js-data-firebase>
5+
* Copyright (c) 2014-2015 Jason Dobry <http://www.js-data.io/docs/dsfirebaseadapter>
66
* Licensed under the MIT license. <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>
77
*/
88
module.exports = function (grunt) {
@@ -13,7 +13,15 @@ module.exports = function (grunt) {
1313
});
1414
require('time-grunt')(grunt);
1515

16+
var webpack = require('webpack');
1617
var pkg = grunt.file.readJSON('package.json');
18+
var banner = 'js-data-firebase\n' +
19+
'@version ' + pkg.version + ' - Homepage <http://www.js-data.io/docs/dsfirebaseadapter>\n' +
20+
'@author Jason Dobry <[email protected]>\n' +
21+
'@copyright (c) 2014-2015 Jason Dobry \n' +
22+
'@license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>\n' +
23+
'\n' +
24+
'@overview localStorage adapter for js-data.';
1725

1826
// Project configuration.
1927
grunt.initConfig({
@@ -22,10 +30,6 @@ module.exports = function (grunt) {
2230
coverage: ['coverage/'],
2331
dist: ['dist/']
2432
},
25-
jshint: {
26-
all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js'],
27-
jshintrc: '.jshintrc'
28-
},
2933
watch: {
3034
dist: {
3135
files: ['src/**/*.js'],
@@ -37,32 +41,58 @@ module.exports = function (grunt) {
3741
options: {
3842
sourceMap: true,
3943
sourceMapName: 'dist/js-data-firebase.min.map',
40-
banner: '/**\n' +
41-
'* @author Jason Dobry <[email protected]>\n' +
42-
'* @file js-data-firebase.min.js\n' +
43-
'* @version <%= pkg.version %> - Homepage <http://wwwjs-data.io/js-data-firebase>\n' +
44-
'* @copyright (c) 2014 Jason Dobry\n' +
45-
'* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>\n' +
46-
'*\n' +
47-
'* @overview Firebase adapter for js-data.\n' +
48-
'*/\n'
44+
banner: '/*!\n' +
45+
'* js-data-firebase\n' +
46+
'* @version <%= pkg.version %> - Homepage <http://wwwjs-data.io/docs/dsfirebaseadapter>\n' +
47+
'* @author Jason Dobry <[email protected]>\n' +
48+
'* @copyright (c) 2014-2015 Jason Dobry\n' +
49+
'* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>\n' +
50+
'*\n' +
51+
'* @overview Firebase adapter for js-data.\n' +
52+
'*/\n'
4953
},
5054
files: {
5155
'dist/js-data-firebase.min.js': ['dist/js-data-firebase.js']
5256
}
5357
}
5458
},
55-
browserify: {
56-
options: {
57-
browserifyOptions: {
58-
standalone: 'DSFirebaseAdapter'
59-
},
60-
external: ['firebase', 'js-data']
61-
},
59+
webpack: {
6260
dist: {
63-
files: {
64-
'dist/js-data-firebase.js': ['src/index.js']
65-
}
61+
entry: './src/index.js',
62+
output: {
63+
filename: './dist/js-data-firebase.js',
64+
libraryTarget: 'umd',
65+
library: 'DSFirebaseAdapter'
66+
},
67+
externals: {
68+
'js-data': {
69+
amd: 'js-data',
70+
commonjs: 'js-data',
71+
commonjs2: 'js-data',
72+
root: 'JSData'
73+
},
74+
'firebase': {
75+
amd: 'firebase',
76+
commonjs: 'firebase',
77+
commonjs2: 'firebase',
78+
root: 'Firebase'
79+
}
80+
},
81+
module: {
82+
loaders: [
83+
{ test: /(src)(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
84+
],
85+
preLoaders: [
86+
{
87+
test: /(src)(.+)\.js$|(test)(.+)\.js$/, // include .js files
88+
exclude: /node_modules/, // exclude any and all files in the node_modules folder
89+
loader: "jshint-loader?failOnHint=true"
90+
}
91+
]
92+
},
93+
plugins: [
94+
new webpack.BannerPlugin(banner)
95+
]
6696
}
6797
},
6898
karma: {
@@ -99,38 +129,10 @@ module.exports = function (grunt) {
99129
}
100130
});
101131

102-
grunt.registerTask('version', function (filePath) {
103-
var file = grunt.file.read(filePath);
104-
105-
file = file.replace(/<%= pkg\.version %>/gi, pkg.version);
106-
107-
grunt.file.write(filePath, file);
108-
});
109-
110-
grunt.registerTask('banner', function () {
111-
var file = grunt.file.read('dist/js-data-firebase.js');
112-
113-
var banner = '/**\n' +
114-
'* @author Jason Dobry <[email protected]>\n' +
115-
'* @file js-data-firebase.js\n' +
116-
'* @version ' + pkg.version + ' - Homepage <http://www.js-data.iojs-data-firebase/>\n' +
117-
'* @copyright (c) 2014 Jason Dobry \n' +
118-
'* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>\n' +
119-
'*\n' +
120-
'* @overview Firebase adapter for js-data.\n' +
121-
'*/\n';
122-
123-
file = banner + file;
124-
125-
grunt.file.write('dist/js-data-firebase.js', file);
126-
});
127-
128132
grunt.registerTask('test', ['build', 'karma:ci', 'karma:min']);
129133
grunt.registerTask('build', [
130134
'clean',
131-
'jshint',
132-
'browserify',
133-
'banner',
135+
'webpack',
134136
'uglify:main'
135137
]);
136138
grunt.registerTask('go', ['build', 'watch:dist']);

README.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
<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" />
22

3-
## js-data-firebase [![Bower version](https://badge.fury.io/bo/js-data-firebase.png)](http://badge.fury.io/bo/js-data-firebase) [![NPM version](https://badge.fury.io/js/js-data-firebase.png)](http://badge.fury.io/js/js-data-firebase)
3+
## js-data-firebase [![bower version](https://img.shields.io/bower/v/js-data-firebase.svg?style=flat-square)](https://www.npmjs.org/package/js-data-firebase) [![npm version](https://img.shields.io/npm/v/js-data-firebase.svg?style=flat-square)](https://www.npmjs.org/package/js-data-firebase) [![Circle CI](https://img.shields.io/circleci/project/js-data/js-data-firebase/master.svg?style=flat-square)](https://circleci.com/gh/js-data/js-data-firebase/tree/master) [![npm downloads](https://img.shields.io/npm/dm/js-data-firebase.svg?style=flat-square)](https://www.npmjs.org/package/js-data-firebase) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/js-data/js-data-firebase/blob/master/LICENSE)
44

55
Firebase adapter for [js-data](http://www.js-data.io/).
66

7-
## API Documentation
7+
### API Documentation
88
[DSFirebaseAdapter](http://www.js-data.io/docs/dsfirebaseadapter)
99

10-
## Demos
10+
### Demos
1111
[js-data-firebase + Angular](https://js-data-firebase.firebaseapp.com/angular/)
12+
1213
[js-data-firebase + React](https://js-data-firebase.firebaseapp.com/react/)
1314

14-
## Project Status
15+
### Project Status
16+
17+
__Latest Release:__ [![Latest Release](https://img.shields.io/github/release/js-data/js-data-firebase.svg?style=flat-square)](https://github.com/js-data/js-data-firebase/releases)
18+
19+
__Status:__
20+
21+
[![Dependency Status](https://img.shields.io/gemnasium/js-data/js-data-firebase.svg?style=flat-square)](https://gemnasium.com/js-data/js-data-firebase) [![Coverage Status](https://img.shields.io/coveralls/js-data/js-data-firebase/master.svg?style=flat-square)](https://coveralls.io/r/js-data/js-data-firebase?branch=master) [![Codacity](https://img.shields.io/codacy/47f0a155f0de4a74b951103a4578353f.svg?style=flat-square)](https://www.codacy.com/public/jasondobry/js-data-firebase/dashboard)
22+
23+
__Supported Platforms:__
1524

16-
| Branch | Master |
17-
| ------ | ------ |
18-
| Bower | [![Bower version](https://badge.fury.io/bo/js-data-firebase.png)](http://badge.fury.io/bo/js-data-firebase) |
19-
| NPM | [![NPM](https://nodei.co/npm/js-data-firebase.png?downloads=true&stars=true)](https://nodei.co/npm/js-data-firebase/) |
20-
| Build Status | [![Build Status](https://travis-ci.org/js-data/js-data-firebase.png?branch=master)](https://travis-ci.org/js-data/js-data-firebase) |
21-
| Code Climate | [![Code Climate](https://codeclimate.com/github/js-data/js-data-firebase.png)](https://codeclimate.com/github/js-data/js-data-firebase) |
22-
| Dependency Status | [![Dependency Status](https://gemnasium.com/js-data/js-data-firebase.png)](https://gemnasium.com/js-data/js-data-firebase) |
23-
| Coverage | [![Coverage Status](https://coveralls.io/repos/js-data/js-data-firebase/badge.png?branch=master)](https://coveralls.io/r/js-data/js-data-firebase?branch=master) |
25+
[![browsers](https://img.shields.io/badge/Browser-Chrome%2CFirefox%2CSafari%2COpera%2CIE%209%2B%2CiOS%20Safari%207.1%2B%2CAndroid%20Browser%202.3%2B-green.svg?style=flat-square)](https://github.com/js-data/js-data)
2426

25-
## Quick Start
27+
### Quick Start
2628
`bower install --save js-data js-data-firebase` or `npm install --save js-data js-data-firebase`.
2729

2830
Load `firebase.js`.
@@ -41,18 +43,28 @@ store.registerAdapter('firebase', adapter, { default: true });
4143
// "store" will now use the firebase adapter for all async operations
4244
```
4345

44-
## Changelog
46+
### Changelog
4547
[CHANGELOG.md](https://github.com/js-data/js-data-firebase/blob/master/CHANGELOG.md)
4648

47-
## Community
49+
### Community
4850
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
4951
- [Issues](https://github.com/js-data/js-data-firebase/issues) - Found a bug? Feature request? Submit an issue!
5052
- [GitHub](https://github.com/js-data/js-data-firebase) - View the source code for js-data.
5153
- [Contributing Guide](https://github.com/js-data/js-data-firebase/blob/master/CONTRIBUTING.md)
5254

53-
## Contributing
55+
### Contributing
56+
57+
First, support is handled via the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions there.
58+
59+
When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy.
60+
61+
- good - Your versions of js-data, js-data-firebase, etc., relevant console logs/error, code examples that revealed the issue
62+
- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or [bin](http://jsbin.com/?html,output) that demonstrates the issue
63+
- best - A Pull Request that fixes the issue, including test coverage for the issue and the fix
64+
65+
[Github Issues](https://github.com/js-data/js-data-firebase/issues).
5466

55-
First, feel free to contact me with questions. [Mailing List](https://groups.io/org/groupsio/jsdata). [Issues](https://github.com/js-data/js-data-firebase/issues).
67+
#### Pull Requests
5668

5769
1. Contribute to the issue that is the reason you'll be developing in the first place
5870
1. Fork js-data-firebase
@@ -63,7 +75,7 @@ First, feel free to contact me with questions. [Mailing List](https://groups.io/
6375
1. Write your code, including relevant documentation and tests
6476
1. Submit a PR and we'll review
6577

66-
## License
78+
### License
6779

6880
The MIT License (MIT)
6981

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"karma.start.js"
3030
],
3131
"dependencies": {
32-
"js-data": ">=1.2.0",
32+
"js-data": ">=1.5.7",
3333
"firebase": ">=1.1.x"
3434
}
3535
}

circle.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dependencies:
2+
pre:
3+
- bower install
4+
cache_directories:
5+
- "bower_components"
6+
test:
7+
post:
8+
- grunt coveralls || true

0 commit comments

Comments
 (0)