Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05c4e7a

Browse files
committed
Stable Version 2.2.2.
Fixes#312Fixes#313
1 parent2176abd commit05c4e7a

File tree

12 files changed

+68
-75
lines changed

12 files changed

+68
-75
lines changed

‎.travis.yml‎

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

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#####2.2.2 - 04 March 2015
2+
3+
######Backwards compatible bug fixes
4+
-#312 - UMDifying js-data-angular
5+
-#313 - DSHttpAdapter#find/create/update/destroy do not call queryTransform
6+
17
#####2.2.1 - 25 February 2015
28

39
######Backwards compatible bug fixes

‎Gruntfile.js‎

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* js-data-angular
33
* http://github.com/js-data/js-data-angular
44
*
5-
* Copyright (c) 2014 Jason Dobry <http://www.js-data.io/js-data-angular>
5+
* Copyright (c) 2014-2015 Jason Dobry <http://www.js-data.io/docs/js-data-angular>
66
* Licensed under the MIT license. <https://github.com/js-data/js-data-angular/blob/master/LICENSE>
77
*/
88
module.exports=function(grunt){
@@ -40,7 +40,7 @@ module.exports = function (grunt) {
4040
'* @author Jason Dobry <jason.dobry@gmail.com>\n'+
4141
'* @file js-data-angular.min.js\n'+
4242
'* @version <%= pkg.version %> - Homepage <https://www.js-data.io/js-data-angular/>\n'+
43-
'* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>\n'+
43+
'* @copyright (c) 2014-2015 Jason Dobry <https://github.com/jmdobry/>\n'+
4444
'* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>\n'+
4545
'*\n'+
4646
'* @overview Angular wrapper for js-data.\n'+
@@ -49,21 +49,6 @@ module.exports = function (grunt) {
4949
files:{
5050
'dist/js-data-angular.min.js':['dist/js-data-angular.js']
5151
}
52-
},
53-
scripts:{
54-
files:{
55-
'doc/resources/js/libs.min.js':['doc/resources/js/libs.js']
56-
}
57-
}
58-
},
59-
browserify:{
60-
options:{
61-
external:['js-data']
62-
},
63-
dist:{
64-
files:{
65-
'dist/js-data-angular.js':['src/index.js']
66-
}
6752
}
6853
},
6954
karma:{
@@ -107,29 +92,28 @@ module.exports = function (grunt) {
10792
});
10893

10994
grunt.registerTask('banner',function(){
110-
varfile=grunt.file.read('dist/js-data-angular.js');
95+
varfile=grunt.file.read('./src/index.js');
11196

11297
varbanner='/**\n'+
11398
'* @author Jason Dobry <jason.dobry@gmail.com>\n'+
11499
'* @file js-data-angular.js\n'+
115-
'* @version '+pkg.version+' - Homepage <http://www.js-data.io/js-data-angular/>\n'+
116-
'* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>\n'+
100+
'* @version '+pkg.version+' - Homepage <http://www.js-data.io/docs/js-data-angular/>\n'+
101+
'* @copyright (c) 2014-2015 Jason Dobry <https://github.com/jmdobry/>\n'+
117102
'* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>\n'+
118103
'*\n'+
119104
'* @overview Angular wrapper for js-data.js.\n'+
120105
'*/\n';
121106

122107
file=banner+file;
123108

124-
grunt.file.write('dist/js-data-angular.js',file);
109+
grunt.file.write('./dist/js-data-angular.js',file);
125110
});
126111

127112
grunt.registerTask('build',[
128113
'clean',
129114
'jshint',
130-
'browserify',
131115
'banner',
132-
'uglify:main'
116+
'uglify'
133117
]);
134118
grunt.registerTask('go',['build','watch:dist']);
135119
grunt.registerTask('default',['build']);

‎dist/js-data-angular.js‎

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
/**
22
*@author Jason Dobry <jason.dobry@gmail.com>
33
*@file js-data-angular.js
4-
*@version 2.2.1 - Homepage <http://www.js-data.io/js-data-angular/>
5-
*@copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
4+
*@version 2.2.2 - Homepage <http://www.js-data.io/docs/js-data-angular/>
5+
*@copyright (c) 2014-2015 Jason Dobry <https://github.com/jmdobry/>
66
*@license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>
77
*
88
*@overview Angular wrapper for js-data.js.
99
*/
10-
(functione(t,n,r){functions(o,u){if(!n[o]){if(!t[o]){vara=typeofrequire=="function"&&require;if(!u&&a)returna(o,!0);if(i)returni(o,!0);varf=newError("Cannot find module '"+o+"'");throwf.code="MODULE_NOT_FOUND",f}varl=n[o]={exports:{}};t[o][0].call(l.exports,function(e){varn=t[o][1][e];returns(n?n:e)},l,l.exports,e,t,n,r)}returnn[o].exports}vari=typeofrequire=="function"&&require;for(varo=0;o<r.length;o++)s(r[o]);returns})({1:[function(require,module,exports){
1110
/*jshint loopfunc:true*/
12-
(function(window,angular,undefined){
11+
(function(root,factory){
1312
'use strict';
1413

15-
varJSData;
16-
17-
try{
18-
JSData=require('js-data');
19-
}catch(e){
20-
21-
}
22-
23-
if(!JSData){
24-
JSData=window.JSData;
14+
if(typeofdefine==='function'&&define.amd){
15+
define(['angular','js-data'],function(angular,JSData){
16+
returnfactory(root,angular,JSData,undefined);
17+
});
18+
}elseif(typeofexports==='object'&&typeofmodule==='object'){
19+
module.exports=factory(root,require('angular')||root.angular,require('js-data')||root.JSData,undefined);
20+
}elseif(typeofexports==='object'){
21+
exports.jsDataAngularModuleName=factory(root,require('angular')||root.angular,require('js-data')||root.JSData,undefined);
22+
}else{
23+
root.jsDataAngularModuleName=factory(root,root.angular,root.JSData,undefined);
2524
}
25+
}(this,function(window,angular,JSData,undefined){
26+
'use strict';
2627

27-
if(!JSData){
28-
thrownewError('js-data must be loaded!');
28+
if(!JSData||!angular){
29+
thrownewError('js-dataand angularmust be loaded!');
2930
}
3031

3132
varDSUtils=JSData.DSUtils;
@@ -358,6 +359,8 @@
358359
var_this=this;
359360
options=options||{};
360361
options.suffix=options.suffix||resourceConfig.suffix;
362+
options.params=options.params||{};
363+
options.params=_this.defaults.queryTransform(resourceConfig,options.params);
361364
return_this.GET(
362365
_this.getPath('find',resourceConfig,id,options),
363366
options
@@ -393,6 +396,8 @@
393396
var_this=this;
394397
options=options||{};
395398
options.suffix=options.suffix||resourceConfig.suffix;
399+
options.params=options.params||{};
400+
options.params=_this.defaults.queryTransform(resourceConfig,options.params);
396401
return_this.POST(
397402
_this.getPath('create',resourceConfig,attrs,options),
398403
(options.serialize ?options.serialize :_this.defaults.serialize)(resourceConfig,attrs),
@@ -406,6 +411,8 @@
406411
var_this=this;
407412
options=options||{};
408413
options.suffix=options.suffix||resourceConfig.suffix;
414+
options.params=options.params||{};
415+
options.params=_this.defaults.queryTransform(resourceConfig,options.params);
409416
return_this.PUT(
410417
_this.getPath('update',resourceConfig,id,options),
411418
(options.serialize ?options.serialize :_this.defaults.serialize)(resourceConfig,attrs),
@@ -438,6 +445,8 @@
438445
var_this=this;
439446
options=options||{};
440447
options.suffix=options.suffix||resourceConfig.suffix;
448+
options.params=options.params||{};
449+
options.params=_this.defaults.queryTransform(resourceConfig,options.params);
441450
return_this.DEL(
442451
_this.getPath('destroy',resourceConfig,id,options),
443452
options
@@ -472,7 +481,7 @@
472481
var_this=this;
473482
varstart=newDate();
474483
config=deepMixIn(config,_this.defaults.httpConfig);
475-
if(_this.defaults.forceTrailingSlash&&config.url[config.url.length-1]!=='/'){
484+
if(_this.defaults.forceTrailingSlash&&config.url[config.url.length-1]!=='/'){
476485
config.url+='/';
477486
}
478487
config.method=config.method.toUpperCase();
@@ -513,6 +522,6 @@
513522
}]);
514523
}
515524

516-
})(window,window.angular);
517-
518-
},{"js-data":"js-data"}]},{},[1]);
525+
// return the module name
526+
return'js-data';
527+
}));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp