Skip to content

Commit d606229

Browse files
committed
Initial commit
0 parents  commit d606229

18 files changed

+1331
-0
lines changed

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Dependency directory
23+
# Commenting this out is preferred by some people, see
24+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25+
node_modules/
26+
bower_components/
27+
28+
# Users Environment Variables
29+
.lock-wscript
30+
31+
.idea/
32+
*.iml
33+
34+
db/

.jshintrc

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

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
##### 0.1.0 - 03 July 2015
2+
3+
- Initial Release

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing Guide
2+
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-rethinkdb, 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-rethinkdb/issues).
12+
13+
#### Pull Requests
14+
15+
1. Contribute to the issue that is the reason you'll be developing in the first place
16+
1. Fork js-data-rethinkdb
17+
1. `git clone https://github.com/<you>/js-data-rethinkdb.git`
18+
1. `cd js-data-rethinkdb; npm install; bower install;`
19+
1. `grunt go` (builds and starts a watch)
20+
1. (in another terminal) `grunt karma:dev` (runs the tests)
21+
1. Write your code, including relevant documentation and tests
22+
1. Submit a PR and we'll review

Gruntfile.js

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* js-data-levelup
3+
* https://github.com/js-data/js-data-levelup
4+
*
5+
* Copyright (c) 2014-2015 Jason Dobry <http://www.js-data.io/docs/dslevelupadapter>
6+
* Licensed under the MIT license. <https://github.com/js-data/js-data-levelup/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+
watch: {
22+
dist: {
23+
files: ['src/**/*.js'],
24+
tasks: ['build']
25+
}
26+
},
27+
coveralls: {
28+
options: {
29+
coverage_dir: 'coverage'
30+
}
31+
},
32+
mochaTest: {
33+
all: {
34+
options: {
35+
timeout: 20000,
36+
reporter: 'spec'
37+
},
38+
src: ['mocha.start.js', 'test/**/*.js']
39+
}
40+
},
41+
webpack: {
42+
dist: {
43+
debug: true,
44+
entry: './src/index.js',
45+
output: {
46+
filename: './dist/js-data-levelup.js',
47+
libraryTarget: 'commonjs2',
48+
library: 'js-data-levelup'
49+
},
50+
externals: [
51+
'mout/random/guid',
52+
'js-data',
53+
'levelup'
54+
],
55+
module: {
56+
loaders: [
57+
{ test: /(src)(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
58+
],
59+
preLoaders: [
60+
{
61+
test: /(src)(.+)\.js$|(test)(.+)\.js$/, // include .js files
62+
exclude: /node_modules/, // exclude any and all files in the node_modules folder
63+
loader: "jshint-loader?failOnHint=true"
64+
}
65+
]
66+
}
67+
}
68+
}
69+
});
70+
71+
grunt.registerTask('n', ['mochaTest']);
72+
73+
grunt.registerTask('test', ['build', 'n']);
74+
grunt.registerTask('build', [
75+
'webpack'
76+
]);
77+
grunt.registerTask('go', ['build', 'watch:dist']);
78+
grunt.registerTask('default', ['build']);
79+
};

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014-2015 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.
22+

README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<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" />
2+
3+
## js-data-levelup [![npm version](https://img.shields.io/npm/v/js-data-levelup.svg?style=flat-square)](https://www.npmjs.org/package/js-data-levelup) [![Travis CI](https://img.shields.io/travis/js-data/js-data-levelup.svg?style=flat-square)](https://travis-ci.org/js-data/js-data-levelup) [![npm downloads](https://img.shields.io/npm/dm/js-data-levelup.svg?style=flat-square)](https://www.npmjs.org/package/js-data-levelup) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/js-data/js-data-levelup/blob/master/LICENSE)
4+
5+
LevelUp adapter for [js-data](http://www.js-data.io/).
6+
7+
### API Documentation
8+
[DSLevelUpAdapter](http://www.js-data.io/docs/dslevelupadapter)
9+
10+
### Project Status
11+
12+
__Latest Release:__ [![Latest Release](https://img.shields.io/github/release/js-data/js-data-levelup.svg?style=flat-square)](https://github.com/js-data/js-data-levelup/releases)
13+
14+
__Status:__
15+
16+
[![Dependency Status](https://img.shields.io/gemnasium/js-data/js-data-levelup.svg?style=flat-square)](https://gemnasium.com/js-data/js-data-levelup) [![Codacity](https://img.shields.io/codacy/69206fcb0df6462ca559610af32fd1fb.svg?style=flat-square)](https://www.codacy.com/public/jasondobry/js-data-levelup/dashboard)
17+
18+
__Supported Platforms:__
19+
20+
[![node version](https://img.shields.io/badge/Node-0.10%2B-green.svg?style=flat-square)](https://github.com/js-data/js-data)
21+
22+
### Quick Start
23+
`npm install --save js-data js-data-levelup`.
24+
25+
```js
26+
var JSData = require('js-data');
27+
var DSLevelUpAdapter = require('js-data-levelup');
28+
29+
var store = new JSData.DS();
30+
31+
// The levelup "db" object will be available at "adapter.db"
32+
var adapter = new DSLevelUpAdapter('./db');
33+
34+
store.registerAdapter('levelup', adapter, { default: true });
35+
36+
// "store" will now use the LevelUp adapter for all async operations
37+
```
38+
39+
### Changelog
40+
[CHANGELOG.md](https://github.com/js-data/js-data-levelup/blob/master/CHANGELOG.md)
41+
42+
### Community
43+
- [Gitter Channel](https://gitter.im/js-data/js-data) - Better than IRC!
44+
- [Announcements](http://www.js-data.io/blog)
45+
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
46+
- [Issues](https://github.com/js-data/js-data-levelup/issues) - Found a bug? Feature request? Submit an issue!
47+
- [GitHub](https://github.com/js-data/js-data-levelup) - View the source code for js-data.
48+
- [Contributing Guide](https://github.com/js-data/js-data-levelup/blob/master/CONTRIBUTING.md)
49+
50+
### Contributing
51+
52+
First, support is handled via the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions there.
53+
54+
When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy.
55+
56+
- good - Your versions of js-data, js-data-levelup, etc., relevant console logs/error, code examples that revealed the issue
57+
- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or [bin](http://jsbin.com/?html,output) that demonstrates the issue
58+
- best - A Pull Request that fixes the issue, including test coverage for the issue and the fix
59+
60+
[Github Issues](https://github.com/js-data/js-data-levelup/issues).
61+
62+
#### Pull Requests
63+
64+
1. Contribute to the issue that is the reason you'll be developing in the first place
65+
1. Fork js-data-levelup
66+
1. `git clone https://github.com/<you>/js-data-levelup.git`
67+
1. `cd js-data-levelup; npm install; bower install;`
68+
1. `grunt go` (builds and starts a watch)
69+
1. (in another terminal) `grunt karma:dev` (runs the tests)
70+
1. Write your code, including relevant documentation and tests
71+
1. Submit a PR and we'll review
72+
73+
### License
74+
75+
The MIT License (MIT)
76+
77+
Copyright (c) 2014-2015 Jason Dobry
78+
79+
Permission is hereby granted, free of charge, to any person obtaining a copy
80+
of this software and associated documentation files (the "Software"), to deal
81+
in the Software without restriction, including without limitation the rights
82+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
83+
copies of the Software, and to permit persons to whom the Software is
84+
furnished to do so, subject to the following conditions:
85+
86+
The above copyright notice and this permission notice shall be included in all
87+
copies or substantial portions of the Software.
88+
89+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
90+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
91+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
92+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
93+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
94+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
95+
SOFTWARE.

0 commit comments

Comments
 (0)