Skip to content

Commit 23f3c8d

Browse files
committed
Converted to ES6.
1 parent 4c82c7e commit 23f3c8d

File tree

7 files changed

+559
-169
lines changed

7 files changed

+559
-169
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,

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##### 0.3.0 - 11 March 2015
2+
3+
- Converted to ES6.
4+
15
##### 0.2.0 - 25 February 2015
26

37
- Upgraded dependencies

Gruntfile.js

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* js-data-sql
33
* http://github.com/js-data/js-data-sql
44
*
5-
* Copyright (c) 2014 Jason Dobry <http://www.js-data.io/js-data-sql>
5+
* Copyright (c) 2014-2015 Jason Dobry <http://www.js-data.io/docs/dssqladapter>
66
* Licensed under the MIT license. <https://github.com/js-data/js-data-sql/blob/master/LICENSE>
77
*/
88
module.exports = function (grunt) {
@@ -18,10 +18,6 @@ module.exports = function (grunt) {
1818
// Project configuration.
1919
grunt.initConfig({
2020
pkg: pkg,
21-
jshint: {
22-
all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js'],
23-
jshintrc: '.jshintrc'
24-
},
2521
watch: {
2622
dist: {
2723
files: ['src/**/*.js'],
@@ -41,14 +37,48 @@ module.exports = function (grunt) {
4137
},
4238
src: ['mocha.start.js', 'test/**/*.js']
4339
}
40+
},
41+
webpack: {
42+
dist: {
43+
debug: true,
44+
entry: './src/index.js',
45+
output: {
46+
filename: './dist/js-data-sql.js',
47+
libraryTarget: 'commonjs2',
48+
library: 'js-data-sql'
49+
},
50+
externals: [
51+
'mout/array/map',
52+
'mout/object/keys',
53+
'mout/lang/isEmpty',
54+
'mout/lang/toString',
55+
'mout/string/upperCase',
56+
'mout/string/underscore',
57+
'js-data',
58+
'js-data-schema',
59+
'knex'
60+
],
61+
module: {
62+
loaders: [
63+
{ test: /(src)(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
64+
],
65+
preLoaders: [
66+
{
67+
test: /(src)(.+)\.js$|(test)(.+)\.js$/, // include .js files
68+
exclude: /node_modules/, // exclude any and all files in the node_modules folder
69+
loader: "jshint-loader?failOnHint=true"
70+
}
71+
]
72+
}
73+
}
4474
}
4575
});
4676

4777
grunt.registerTask('n', ['mochaTest']);
4878

4979
grunt.registerTask('test', ['build', 'n']);
5080
grunt.registerTask('build', [
51-
'jshint'
81+
'webpack'
5282
]);
5383
grunt.registerTask('go', ['build', 'watch:dist']);
5484
grunt.registerTask('default', ['build']);

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
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-sql [![NPM version](https://badge.fury.io/js/js-data-sql.png)](http://badge.fury.io/js/js-data-sql)
3+
## js-data-sql [![npm version](https://img.shields.io/npm/v/js-data-sql.svg?style=flat-square)](https://www.npmjs.org/package/js-data-sql) [![Circle CI](https://img.shields.io/circleci/project/js-data/js-data-sql/master.svg?style=flat-square)](https://circleci.com/gh/js-data/js-data-sql/tree/master) [![npm downloads](https://img.shields.io/npm/dm/js-data-sql.svg?style=flat-square)](https://www.npmjs.org/package/js-data-sql) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/js-data/js-data-sql/blob/master/LICENSE)
44

55
Postgres/MySQL/MariaDB/SQLite3 adapter for [js-data](http://www.js-data.io/).
66

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

10-
## Project Status
10+
### Project Status
1111

12-
| Branch | Master |
13-
| ------ | ------ |
14-
| NPM | [![NPM](https://nodei.co/npm/js-data-sql.png?downloads=true&stars=true)](https://nodei.co/npm/js-data-sql/) |
15-
| Build Status | [![Circle CI](https://circleci.com/gh/js-data/js-data-sql.svg?style=svg)](https://circleci.com/gh/js-data/js-data-sql) |
16-
| Code Climate | [![Code Climate](https://codeclimate.com/github/js-data/js-data-sql.png)](https://codeclimate.com/github/js-data/js-data-sql) |
17-
| Dependency Status | [![Dependency Status](https://gemnasium.com/js-data/js-data-sql.png)](https://gemnasium.com/js-data/js-data-sql) |
18-
| Coverage | [![Coverage Status](https://coveralls.io/repos/js-data/js-data-sql/badge.png?branch=master)](https://coveralls.io/r/js-data/js-data-sql?branch=master) |
12+
__Latest Release:__ [![Latest Release](https://img.shields.io/github/release/js-data/js-data-sql.svg?style=flat-square)](https://github.com/js-data/js-data-sql/releases)
1913

20-
## Quick Start
14+
__Status:__
15+
16+
[![Dependency Status](https://img.shields.io/gemnasium/js-data/js-data-sql.svg?style=flat-square)](https://gemnasium.com/js-data/js-data-sql) [![Codacy](https://img.shields.io/codacy/4da2bc1bbca74fd38c4532cb8bc8d40a.svg?style=flat-square)](https://www.codacy.com/public/jasondobry/js-data-sql/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
2123
`npm install --save js-data js-data-sql`.
2224

2325
```js
@@ -39,16 +41,16 @@ store.registerAdapter('sql', adapter, { default: true });
3941
// "store" will now use the Sql adapter for all async operations
4042
```
4143

42-
## Changelog
44+
### Changelog
4345
[CHANGELOG.md](https://github.com/js-data/js-data-sql/blob/master/CHANGELOG.md)
4446

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

51-
## Contributing
53+
### Contributing
5254

5355
First, feel free to contact me with questions. [Mailing List](https://groups.io/org/groupsio/jsdata). [Issues](https://github.com/js-data/js-data-sql/issues).
5456

@@ -61,7 +63,7 @@ First, feel free to contact me with questions. [Mailing List](https://groups.io/
6163
1. Write your code, including relevant documentation and tests
6264
1. Submit a PR and we'll review
6365

64-
## License
66+
### License
6567

6668
The MIT License (MIT)
6769

0 commit comments

Comments
 (0)