Skip to content

Commit

Permalink
Stable Version 2.2.2.
Browse files Browse the repository at this point in the history
Fixes #312
Fixes #313
  • Loading branch information
jmdobry committed Mar 5, 2015
1 parent 2176abd commit 05c4e7a
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 75 deletions.
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
##### 2.2.2 - 04 March 2015

###### Backwards compatible bug fixes
- #312 - UMDifying js-data-angular
- #313 - DSHttpAdapter#find/create/update/destroy do not call queryTransform

##### 2.2.1 - 25 February 2015

###### Backwards compatible bug fixes
Expand Down
30 changes: 7 additions & 23 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* js-data-angular
* http://github.com/js-data/js-data-angular
*
* Copyright (c) 2014 Jason Dobry <http://www.js-data.io/js-data-angular>
* Copyright (c) 2014-2015 Jason Dobry <http://www.js-data.io/docs/js-data-angular>
* Licensed under the MIT license. <https://github.com/js-data/js-data-angular/blob/master/LICENSE>
*/
module.exports = function (grunt) {
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = function (grunt) {
'* @author Jason Dobry <[email protected]>\n' +
'* @file js-data-angular.min.js\n' +
'* @version <%= pkg.version %> - Homepage <https://www.js-data.io/js-data-angular/>\n' +
'* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>\n' +
'* @copyright (c) 2014-2015 Jason Dobry <https://github.com/jmdobry/>\n' +
'* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>\n' +
'*\n' +
'* @overview Angular wrapper for js-data.\n' +
Expand All @@ -49,21 +49,6 @@ module.exports = function (grunt) {
files: {
'dist/js-data-angular.min.js': ['dist/js-data-angular.js']
}
},
scripts: {
files: {
'doc/resources/js/libs.min.js': ['doc/resources/js/libs.js']
}
}
},
browserify: {
options: {
external: ['js-data']
},
dist: {
files: {
'dist/js-data-angular.js': ['src/index.js']
}
}
},
karma: {
Expand Down Expand Up @@ -107,29 +92,28 @@ module.exports = function (grunt) {
});

grunt.registerTask('banner', function () {
var file = grunt.file.read('dist/js-data-angular.js');
var file = grunt.file.read('./src/index.js');

var banner = '/**\n' +
'* @author Jason Dobry <[email protected]>\n' +
'* @file js-data-angular.js\n' +
'* @version ' + pkg.version + ' - Homepage <http://www.js-data.io/js-data-angular/>\n' +
'* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>\n' +
'* @version ' + pkg.version + ' - Homepage <http://www.js-data.io/docs/js-data-angular/>\n' +
'* @copyright (c) 2014-2015 Jason Dobry <https://github.com/jmdobry/>\n' +
'* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>\n' +
'*\n' +
'* @overview Angular wrapper for js-data.js.\n' +
'*/\n';

file = banner + file;

grunt.file.write('dist/js-data-angular.js', file);
grunt.file.write('./dist/js-data-angular.js', file);
});

grunt.registerTask('build', [
'clean',
'jshint',
'browserify',
'banner',
'uglify:main'
'uglify'
]);
grunt.registerTask('go', ['build', 'watch:dist']);
grunt.registerTask('default', ['build']);
Expand Down
49 changes: 29 additions & 20 deletions dist/js-data-angular.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
/**
* @author Jason Dobry <[email protected]>
* @file js-data-angular.js
* @version 2.2.1 - Homepage <http://www.js-data.io/js-data-angular/>
* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
* @version 2.2.2 - Homepage <http://www.js-data.io/docs/js-data-angular/>
* @copyright (c) 2014-2015 Jason Dobry <https://github.com/jmdobry/>
* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>
*
* @overview Angular wrapper for js-data.js.
*/
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*jshint loopfunc:true*/
(function (window, angular, undefined) {
(function (root, factory) {
'use strict';

var JSData;

try {
JSData = require('js-data');
} catch (e) {

}

if (!JSData) {
JSData = window.JSData;
if (typeof define === 'function' && define.amd) {
define(['angular', 'js-data'], function (angular, JSData) {
return factory(root, angular, JSData, undefined);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = factory(root, require('angular') || root.angular, require('js-data') || root.JSData, undefined);
} else if (typeof exports === 'object') {
exports.jsDataAngularModuleName = factory(root, require('angular') || root.angular, require('js-data') || root.JSData, undefined);
} else {
root.jsDataAngularModuleName = factory(root, root.angular, root.JSData, undefined);
}
}(this, function (window, angular, JSData, undefined) {
'use strict';

if (!JSData) {
throw new Error('js-data must be loaded!');
if (!JSData || !angular) {
throw new Error('js-data and angular must be loaded!');
}

var DSUtils = JSData.DSUtils;
Expand Down Expand Up @@ -358,6 +359,8 @@
var _this = this;
options = options || {};
options.suffix = options.suffix || resourceConfig.suffix;
options.params = options.params || {};
options.params = _this.defaults.queryTransform(resourceConfig, options.params);
return _this.GET(
_this.getPath('find', resourceConfig, id, options),
options
Expand Down Expand Up @@ -393,6 +396,8 @@
var _this = this;
options = options || {};
options.suffix = options.suffix || resourceConfig.suffix;
options.params = options.params || {};
options.params = _this.defaults.queryTransform(resourceConfig, options.params);
return _this.POST(
_this.getPath('create', resourceConfig, attrs, options),
(options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs),
Expand All @@ -406,6 +411,8 @@
var _this = this;
options = options || {};
options.suffix = options.suffix || resourceConfig.suffix;
options.params = options.params || {};
options.params = _this.defaults.queryTransform(resourceConfig, options.params);
return _this.PUT(
_this.getPath('update', resourceConfig, id, options),
(options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs),
Expand Down Expand Up @@ -438,6 +445,8 @@
var _this = this;
options = options || {};
options.suffix = options.suffix || resourceConfig.suffix;
options.params = options.params || {};
options.params = _this.defaults.queryTransform(resourceConfig, options.params);
return _this.DEL(
_this.getPath('destroy', resourceConfig, id, options),
options
Expand Down Expand Up @@ -472,7 +481,7 @@
var _this = this;
var start = new Date();
config = deepMixIn(config, _this.defaults.httpConfig);
if (_this.defaults.forceTrailingSlash && config.url[config.url.length-1] !== '/') {
if (_this.defaults.forceTrailingSlash && config.url[config.url.length - 1] !== '/') {
config.url += '/';
}
config.method = config.method.toUpperCase();
Expand Down Expand Up @@ -513,6 +522,6 @@
}]);
}

})(window, window.angular);

},{"js-data":"js-data"}]},{},[1]);
// return the module name
return 'js-data';
}));
Loading

0 comments on commit 05c4e7a

Please sign in to comment.