Skip to content

Commit 018acd3

Browse files
committed
Initial commit
0 parents  commit 018acd3

26 files changed

+2387
-0
lines changed

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "bower_components"
3+
}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
bower_components/
3+
4+
.idea/
5+
6+
*.iml
7+
8+
coverage/

.jshintrc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"node": false,
3+
"browser": true,
4+
"es5": true,
5+
"esnext": true,
6+
"bitwise": true,
7+
"camelcase": true,
8+
"curly": true,
9+
"eqeqeq": true,
10+
"immed": true,
11+
"indent": 2,
12+
"latedef": true,
13+
"newcap": true,
14+
"undef": true,
15+
"unused": true,
16+
"noarg": true,
17+
"quotmark": "single",
18+
"regexp": true,
19+
"strict": false,
20+
"trailing": true,
21+
"smarttabs": true,
22+
"globals": {
23+
"describe": true,
24+
"it": true,
25+
"beforeEach": true,
26+
"afterEach": true,
27+
"assert": true,
28+
"fail": true,
29+
"console": true,
30+
"require": true,
31+
"module": true,
32+
"exports": true
33+
}
34+
}

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
- "0.11"
5+
before_install:
6+
- npm install -g bower
7+
- bower install
8+
- npm install -g grunt-cli
9+
before_script:
10+
- export DISPLAY=:99.0
11+
- sh -e /etc/init.d/xvfb start
12+
script:
13+
- grunt test
14+
- grunt coveralls || true

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
##### <version> - <date>
2+
3+
Initial release

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Contributing Guide
2+
3+
First, feel free to contact me with questions. [Mailing List](https://groups.google.com/forum/?fromgroups#!forum/js-data). [Issues](https://github.com/js-data/js-data/issues).
4+
5+
1. Contribute to the issue that is the reason you'll be developing in the first place
6+
1. Fork js-data
7+
1. `git clone https://github.com/<you>/js-data.git`
8+
1. `cd js-data; npm install; bower install;`
9+
1. `grunt go` (builds and starts a watch)
10+
1. (in another terminal) `grunt karma:dev` (runs the tests)
11+
1. Write your code, including relevant documentation and tests
12+
1. Submit a PR and we'll review

Gruntfile.js

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/*
2+
* js-data-firebase
3+
* http://github.com/js-data/js-data-firebase
4+
*
5+
* Copyright (c) 2014 Jason Dobry <http://www.js-data.io/js-data-firebase>
6+
* Licensed under the MIT license. <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>
7+
*/
8+
module.exports = function (grunt) {
9+
'use strict';
10+
11+
require('jit-grunt')(grunt, {
12+
coveralls: 'grunt-karma-coveralls'
13+
});
14+
require('time-grunt')(grunt);
15+
16+
var pkg = grunt.file.readJSON('package.json');
17+
18+
// Project configuration.
19+
grunt.initConfig({
20+
pkg: pkg,
21+
clean: {
22+
coverage: ['coverage/'],
23+
dist: ['dist/']
24+
},
25+
jshint: {
26+
all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js'],
27+
jshintrc: '.jshintrc'
28+
},
29+
watch: {
30+
dist: {
31+
files: ['src/**/*.js'],
32+
tasks: ['build']
33+
}
34+
},
35+
uglify: {
36+
main: {
37+
options: {
38+
banner: '/**\n' +
39+
'* @author Jason Dobry <[email protected]>\n' +
40+
'* @file js-data-firebase.min.js\n' +
41+
'* @version <%= pkg.version %> - Homepage <http://wwwjs-data.io/js-data-firebase>\n' +
42+
'* @copyright (c) 2014 Jason Dobry\n' +
43+
'* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>\n' +
44+
'*\n' +
45+
'* @overview My Adapter.\n' +
46+
'*/\n'
47+
},
48+
files: {
49+
'dist/js-data-firebase.min.js': ['dist/js-data-firebase.js']
50+
}
51+
}
52+
},
53+
browserify: {
54+
options: {
55+
browserifyOptions: {
56+
standalone: 'FirebaseAdapter'
57+
},
58+
external: ['firebase']
59+
},
60+
dist: {
61+
files: {
62+
'dist/js-data-firebase.js': ['src/index.js']
63+
}
64+
}
65+
},
66+
karma: {
67+
options: {
68+
configFile: './karma.conf.js'
69+
},
70+
dev: {
71+
browsers: ['Chrome'],
72+
autoWatch: true,
73+
singleRun: false,
74+
reporters: ['spec'],
75+
preprocessors: {}
76+
},
77+
min: {
78+
browsers: ['Firefox', 'PhantomJS'],
79+
options: {
80+
files: [
81+
'bower_components/firebase/firebase.js',
82+
'dist/js-data-firebase.min.js',
83+
'karma.start.js',
84+
'test/**/*.js'
85+
]
86+
}
87+
},
88+
ci: {
89+
browsers: ['Firefox']
90+
}
91+
},
92+
coveralls: {
93+
options: {
94+
coverage_dir: 'coverage'
95+
}
96+
}
97+
});
98+
99+
grunt.registerTask('version', function (filePath) {
100+
var file = grunt.file.read(filePath);
101+
102+
file = file.replace(/<%= pkg\.version %>/gi, pkg.version);
103+
104+
grunt.file.write(filePath, file);
105+
});
106+
107+
grunt.registerTask('banner', function () {
108+
var file = grunt.file.read('dist/js-data-firebase.js');
109+
110+
var banner = '/**\n' +
111+
'* @author Jason Dobry <[email protected]>\n' +
112+
'* @file js-data-firebase.js\n' +
113+
'* @version ' + pkg.version + ' - Homepage <http://www.js-data.iojs-data-firebase/>\n' +
114+
'* @copyright (c) 2014 Jason Dobry \n' +
115+
'* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>\n' +
116+
'*\n' +
117+
'* @overview My Adapter.\n' +
118+
'*/\n';
119+
120+
file = banner + file;
121+
122+
grunt.file.write('dist/js-data-firebase.js', file);
123+
});
124+
125+
grunt.registerTask('test', ['build', 'karma:ci', 'karma:min']);
126+
grunt.registerTask('build', [
127+
'clean',
128+
'jshint',
129+
'browserify',
130+
'banner',
131+
'uglify:main'
132+
]);
133+
grunt.registerTask('go', ['build', 'watch:dist']);
134+
grunt.registerTask('default', ['build']);
135+
};

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Jason Dobry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<img src="https://raw.githubusercontent.com/js-data/js-data/prototype/js-data.png" alt="js-data logo" title="js-data" align="right" width="64" height="64" />
2+
3+
## js-data-firebase
4+
5+
Firebase adapter for js-data.
6+
7+
## Documentation
8+
[http://www.js-data.io/js-data-firebase](http://www.js-data.io/js-data-firebase)
9+
10+
## Project Status
11+
12+
| Branch | Master |
13+
| ------ | ------ |
14+
| Bower | [![Bower version](https://badge.fury.io/bo/js-data-firebase.png)](http://badge.fury.io/bo/js-data-firebase) |
15+
| NPM | [![NPM version](https://badge.fury.io/js/js-data-firebase.png)](http://badge.fury.io/js/js-data-firebase) |
16+
| 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) |
17+
| Code Climate | [![Code Climate](https://codeclimate.com/github/js-data/js-data-firebase.png)](https://codeclimate.com/github/js-data/js-data-firebase) |
18+
| Dependency Status | [![Dependency Status](https://gemnasium.com/js-data/js-data-firebase.png)](https://gemnasium.com/js-data/js-data-firebase) |
19+
| 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) |
20+
21+
## Quick Start
22+
`bower install --save js-data-firebase` or `npm install --save js-data-firebase`.
23+
24+
## Changelog
25+
[CHANGELOG.md](https://github.com/js-data/js-data-firebase/blob/master/CHANGELOG.md)
26+
27+
## Community
28+
- [Mailing List](https://groups.google.com/forum/?fromgroups#!forum/js-data-project) - Ask your questions!
29+
- [Issues](https://github.com/js-data/js-data-firebase/issues) - Found a bug? Feature request? Submit an issue!
30+
- [GitHub](https://github.com/js-data/js-data-firebase) - View the source code for js-data.
31+
- [Contributing Guide](https://github.com/js-data/js-data-firebase/blob/master/CONTRIBUTING.md)
32+
33+
## Contributing
34+
35+
First, feel free to contact me with questions. [Mailing List](https://groups.google.com/forum/?fromgroups#!forum/js-data-project). [Issues](https://github.com/js-data/js-data-firebase/issues).
36+
37+
1. Contribute to the issue that is the reason you'll be developing in the first place
38+
1. Fork js-data
39+
1. `git clone https://github.com/<you>/js-data.git`
40+
1. `cd js-data; npm install; bower install;`
41+
1. `grunt go` (builds and starts a watch)
42+
1. (in another terminal) `grunt karma:dev` (runs the tests)
43+
1. Write your code, including relevant documentation and tests
44+
1. Submit a PR and we'll review
45+
46+
## License
47+
48+
Copyright (c) 2014 Jason Dobry
49+
50+
Permission is hereby granted, free of charge, to any person obtaining a copy of
51+
this software and associated documentation files (the "Software"), to deal in
52+
the Software without restriction, including without limitation the rights to
53+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
54+
of the Software, and to permit persons to whom the Software is furnished to do
55+
so, subject to the following conditions:
56+
57+
The above copyright notice and this permission notice shall be included in all
58+
copies or substantial portions of the Software.
59+
60+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
62+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
63+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
64+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
65+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bower.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "js-data-firebase",
3+
"description": "Firebase adapter for js-data.",
4+
"version": "0.1.0",
5+
"homepage": "http://www.js-data.io/js-data-firebase",
6+
"repository": {
7+
"type": "git",
8+
"url": "git://github.com/js-data/js-data-firebase.git"
9+
},
10+
"author": {
11+
"name": "Jason Dobry",
12+
"url": "http://www.pseudobry.com",
13+
"email": "[email protected]"
14+
},
15+
"main": "./dist/js-data-firebase.min.js",
16+
"ignore": [
17+
".idea/",
18+
".*",
19+
"*.iml",
20+
"src/",
21+
"lib/",
22+
"doc/",
23+
"guide/",
24+
"coverage/",
25+
"Gruntfile.js",
26+
"node_modules/",
27+
"test/",
28+
"package.json",
29+
"karma.conf.js",
30+
"karma.start.js"
31+
],
32+
"peerDependencies": {
33+
"js-data": "0.0.1"
34+
},
35+
"devDependencies": {
36+
"firebase": "~1.0.21"
37+
}
38+
}

0 commit comments

Comments
 (0)