Skip to content

Commit 2902cf4

Browse files
committed
Stable Version 2.0.0.
1 parent 57e8c48 commit 2902cf4

20 files changed

+1403
-3098
lines changed

.jshintrc

Lines changed: 2 additions & 5 deletions
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,
@@ -16,22 +15,20 @@
1615
"regexp": true,
1716
"undef": true,
1817
"unused": true,
19-
"strict": true,
18+
"strict": false,
2019
"trailing": true,
2120
"smarttabs": true,
2221
"predef": [
2322
"inject",
2423
"describe",
2524
"it",
26-
"sinon",
2725
"console",
2826
"DS",
2927
"beforeEach",
3028
"afterEach",
3129
"assert",
3230
"require",
3331
"module",
34-
"exports",
35-
"angular"
32+
"exports"
3633
]
3734
}

.travis.yml

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

Gruntfile.js

Lines changed: 70 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
/*
2-
* angular-data-mocks
3-
* http://github.com/jmdobry/angular-data-mocks
2+
* js-data-angular-mocks
3+
* http://github.com/js-data/js-data-angular-mocks
44
*
5-
* Copyright (c) 2014 Jason Dobry <http://jmdobry.github.io/angular-data-mocks>
6-
* Licensed under the MIT license. <https://github.com/jmdobry/angular-data-mocks/blob/master/LICENSE>
5+
* Copyright (c) 2014 Jason Dobry <http://js-data.github.io/js-data-angular-mocks>
6+
* Licensed under the MIT license. <https://github.com/js-data/js-data-angular-mocks/blob/master/LICENSE>
77
*/
88
module.exports = function (grunt) {
99
'use strict';
1010

1111
require('jit-grunt')(grunt);
1212
require('time-grunt')(grunt);
1313

14+
var webpack = require('webpack');
1415
var pkg = grunt.file.readJSON('package.json');
16+
var banner = 'js-data-angular-mocks\n' +
17+
'@version ' + pkg.version + ' - Homepage <https://github.com/js-data/js-data-angular-mocks>\n' +
18+
'@author Jason Dobry <[email protected]>\n' +
19+
'@copyright (c) 2014-2015 Jason Dobry \n' +
20+
'@license MIT <https://github.com/js-data/js-data-angular-mocks/blob/master/LICENSE>\n' +
21+
'\n' +
22+
'@overview A mock of js-data & js-data-angular for testing purposes.';
1523

1624
// Project configuration.
1725
grunt.initConfig({
@@ -20,30 +28,25 @@ module.exports = function (grunt) {
2028
coverage: ['coverage/'],
2129
dist: ['dist/']
2230
},
23-
jshint: {
24-
all: ['Gruntfile.js', 'src/**/*.js'],
25-
test: ['test/**/*.js'],
26-
jshintrc: '.jshintrc'
27-
},
2831
watch: {
2932
files: ['src/**/*.js'],
3033
tasks: ['build']
3134
},
3235
uglify: {
3336
dist: {
3437
options: {
35-
banner: '/**\n' +
36-
'* @author Jason Dobry <[email protected]>\n' +
37-
'* @file angular-data-mocks.min.js\n' +
38-
'* @version <%= pkg.version %> - Homepage <https://github.com/jmdobry/angular-data-mocks>\n' +
39-
'* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>\n' +
40-
'* @license MIT <https://github.com/jmdobry/angular-data-mocks/blob/master/LICENSE>\n' +
41-
'*\n' +
42-
'* @overview A mock of angular-data for testing purposes.\n' +
43-
'*/\n'
38+
banner: '/*!\n' +
39+
'* js-data-angular-mocks\n' +
40+
'* @version <%= pkg.version %> - Homepage <https://github.com/js-data/js-data-angular-mocks>\n' +
41+
'* @author Jason Dobry <jason.dobry@gmail.com>\n' +
42+
'* @copyright (c) 2014-2015 Jason Dobry <https://github.com/js-data/>\n' +
43+
'* @license MIT <https://github.com/js-data/js-data-angular-mocks/blob/master/LICENSE>\n' +
44+
'*\n' +
45+
'* @overview A mock of js-data & js-data-angular for testing purposes.\n' +
46+
'*/\n'
4447
},
4548
files: {
46-
'dist/angular-data-mocks.min.js': ['dist/angular-data-mocks.js']
49+
'dist/js-data-angular-mocks.min.js': ['dist/js-data-angular-mocks.js']
4750
}
4851
}
4952
},
@@ -64,9 +67,12 @@ module.exports = function (grunt) {
6467
files: [
6568
'bower_components/angular/angular.js',
6669
'bower_components/angular-mocks/angular-mocks.js',
67-
'dist/angular-data.min.js',
68-
'test/integration/**/*.js',
69-
'karma.start.js'
70+
'bower_components/js-data/dist/js-data.js',
71+
'bower_components/js-data-angular/dist/js-data-angular.js',
72+
'dist/js-data-angular-mocks.min.js',
73+
'karma.start.js',
74+
'test/testApp.js',
75+
'test/test.js'
7076
]
7177
}
7278
},
@@ -82,29 +88,62 @@ module.exports = function (grunt) {
8288

8389
copy: {
8490
dist: {
85-
src: 'dist/angular-data-mocks.js',
86-
dest: 'dist/angular-data-mocks.js',
91+
src: 'dist/js-data-angular-mocks.js',
92+
dest: 'dist/js-data-angular-mocks.js',
8793
options: {
8894
process: function (content) {
8995
return content.replace(/<%= pkg\.version %>/gi, pkg.version);
9096
}
9197
}
9298
}
9399
},
94-
browserify: {
100+
webpack: {
95101
dist: {
96-
files: {
97-
'dist/angular-data-mocks.js': ['src/index.js']
98-
}
102+
entry: './src/index.js',
103+
output: {
104+
filename: './dist/js-data-angular-mocks.js',
105+
libraryTarget: 'umd',
106+
library: 'jsDataAngularMocksModuleName'
107+
},
108+
externals: {
109+
'js-data': {
110+
amd: 'js-data',
111+
commonjs: 'js-data',
112+
commonjs2: 'js-data',
113+
root: 'JSData'
114+
},
115+
'js-data-angular': {
116+
amd: 'js-data-angular',
117+
commonjs: 'js-data-angular',
118+
commonjs2: 'js-data-angular',
119+
root: 'jsDataAngularModuleName'
120+
},
121+
'sinon': 'sinon',
122+
'angular': 'angular'
123+
},
124+
module: {
125+
loaders: [
126+
{ test: /(src)(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
127+
],
128+
preLoaders: [
129+
{
130+
test: /(src)(.+)\.js$|(test)(.+)\.js$/, // include .js files
131+
exclude: /node_modules/, // exclude any and all files in the node_modules folder
132+
loader: "jshint-loader?failOnHint=true"
133+
}
134+
]
135+
},
136+
plugins: [
137+
new webpack.BannerPlugin(banner)
138+
]
99139
}
100140
}
101141
});
102142

103-
grunt.registerTask('test', ['clean:coverage', 'karma:dev']);
143+
grunt.registerTask('test', ['build', 'karma:ci', 'karma:min']);
104144
grunt.registerTask('build', [
105145
'clean',
106-
'jshint',
107-
'browserify',
146+
'webpack',
108147
'copy',
109148
'uglify:dist'
110149
]);

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Jason Dobry
3+
Copyright (c) 2014-2015 Jason Dobry
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,71 @@
1-
angular-data-mocks
2-
==================
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" />
32

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

6-
[![NPM version](https://badge.fury.io/js/angular-data-mocks.svg)](http://badge.fury.io/js/angular-data-mocks)
5+
Mocks of js-data & js-data-angular for testing purposes.
76

8-
[![Build Status](https://travis-ci.org/jmdobry/angular-data-mocks.svg?branch=master)](https://travis-ci.org/jmdobry/angular-data-mocks)
7+
### Guides
8+
- [Angular + JSData (js-data-angular)](http://www.js-data.io/docs/js-data-angular)
99

10-
[![Coverage Status](https://coveralls.io/repos/jmdobry/angular-data-mocks/badge.png)](https://coveralls.io/r/jmdobry/angular-data-mocks)
10+
### Js-data-angular API Documentation
11+
- [js-data-angular](http://www.js-data.io/docs/js-data-angular)
1112

12-
[![Dependency Status](https://gemnasium.com/jmdobry/angular-data-mocks.svg)](https://gemnasium.com/jmdobry/angular-data-mocks)
13+
### Project Status
1314

14-
A mock of angular-data for testing purposes.
15+
__Latest Release:__ [![Latest Release](https://img.shields.io/github/release/js-data/js-data-angular-mocks.svg?style=flat-square)](https://github.com/js-data/js-data-angular-mocks/releases)
16+
17+
__Status:__
18+
19+
[![Dependency Status](https://img.shields.io/gemnasium/js-data/js-data-angular-mocks.svg?style=flat-square)](https://gemnasium.com/js-data/js-data-angular-mocks) [![Coverage Status](https://img.shields.io/coveralls/js-data/js-data-angular-mocks/master.svg?style=flat-square)](https://coveralls.io/r/js-data/js-data-angular-mocks?branch=master) [![Codacity](https://img.shields.io/codacy/e7690b906dfa471ebcc8b2bdc52e9662.svg?style=flat-square)](https://www.codacy.com/public/jasondobry/js-data-angular-mocks/dashboard)
20+
21+
### Quick Start
22+
23+
See:
24+
25+
- [karma.conf.js](https://github.com/js-data/js-data-angular-mocks/blob/master/karma.conf.js)
26+
- [karma.start.js](https://github.com/js-data/js-data-angular-mocks/blob/master/karma.start.js)
27+
- [test/testApp.js](https://github.com/js-data/js-data-angular-mocks/blob/master/test/testApp.js)
28+
- [test/test.js](https://github.com/js-data/js-data-angular-mocks/blob/master/test/test.js)
29+
30+
### Community
31+
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
32+
- [Issues](https://github.com/js-data/js-data-angular-mocks/issues) - Found a bug? Feature request? Submit an issue!
33+
- [GitHub](https://github.com/js-data/js-data-angular-mocks) - View the source code for js-data.
34+
35+
### Contributing
36+
37+
First, feel free to contact me with questions. [Mailing List](https://groups.io/org/groupsio/jsdata). [Issues](https://github.com/js-data/js-data-angular/issues).
38+
39+
1. Contribute to the issue that is the reason you'll be developing in the first place
40+
1. Fork js-data-angular-mocks
41+
1. `git clone https://github.com/<you>/js-data-angular-mocks.git`
42+
1. `cd js-data-angular-mocks; npm install; bower install;`
43+
1. `grunt go` (builds and starts a watch)
44+
1. (in another terminal) `grunt karma:dev` (runs the tests)
45+
1. Write your code, including relevant documentation and tests
46+
1. Submit a PR and we'll review
47+
48+
### License
49+
50+
The MIT License (MIT)
51+
52+
Copyright (c) 2014-2015 Jason Dobry
53+
54+
Permission is hereby granted, free of charge, to any person obtaining a copy
55+
of this software and associated documentation files (the "Software"), to deal
56+
in the Software without restriction, including without limitation the rights
57+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
58+
copies of the Software, and to permit persons to whom the Software is
59+
furnished to do so, subject to the following conditions:
60+
61+
The above copyright notice and this permission notice shall be included in all
62+
copies or substantial portions of the Software.
63+
64+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
68+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
69+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
70+
SOFTWARE.
1571

16-
[Documentation](http://angular-data.pseudobry.com/documentation/guide/angular-data-mocks/overview)

bower.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"author": "Jason Dobry",
3-
"name": "angular-data-mocks",
4-
"description": "A mock of angular-data for testing purposes.",
5-
"version": "1.0.0",
6-
"homepage": "https://github.com/jmdobry/angular-data-mocks/",
3+
"name": "js-data-angular-mocks",
4+
"description": "A mock of js-data-angular for testing purposes.",
5+
"homepage": "https://github.com/js-data/js-data-angular-mocks/",
76
"repository": {
87
"type": "git",
9-
"url": "git://github.com/jmdobry/angular-data-mocks.git"
8+
"url": "https://github.com/js-data/js-data-angular-mocks.git"
109
},
11-
"main": "./dist/angular-data-mocks.min.js",
10+
"main": "./dist/js-data-angular-mocks.js",
1211
"ignore": [
1312
".idea/",
1413
".*",
@@ -23,11 +22,15 @@
2322
"karma.start.js"
2423
],
2524
"devDependencies": {
26-
"angular": "1.2.25",
27-
"angular-mocks": "1.2.25",
28-
"angular-data": "1.0.0"
25+
"angular": "1.3.2",
26+
"angular-mocks": "1.3.2",
27+
"js-data": ">=1.1.0",
28+
"js-data-angular": ">=2.2.0"
2929
},
30-
"resolutions": {
31-
"angular": "1.2.25"
30+
"dependencies": {
31+
"angular": ">=1.1.0",
32+
"angular-mocks": ">=1.1.0",
33+
"js-data": ">=1.1.0",
34+
"js-data-angular": ">=2.2.0"
3235
}
3336
}

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)