Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 798bca6

Browse files
committed
chore(resource): moved to module
1 parent 8218c4b commit 798bca6

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

Rakefile

+4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter] do
8080
'src/loader.suffix'])
8181

8282
FileUtils.cp 'src/ngMock/angular-mocks.js', path_to('angular-mocks.js')
83+
FileUtils.cp 'src/ngResource/resource.js', path_to('angular-resource.js')
8384

8485

8586
closureCompile('angular.js')
8687
closureCompile('angular-loader.js')
88+
closureCompile('angular-resource.js')
8789

8890
end
8991

@@ -113,6 +115,8 @@ task :package => [:clean, :compile, :docs] do
113115
path_to('angular-loader.js'),
114116
path_to('angular-loader.min.js'),
115117
path_to('angular-mocks.js'),
118+
path_to('angular-resource.js'),
119+
path_to('angular-resource.min.js'),
116120
path_to('angular-scenario.js'),
117121
path_to('jstd-scenario-adapter.js'),
118122
path_to('jstd-scenario-adapter-config.js'),

angularFiles.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ angularFiles = {
2424
'src/ng/log.js',
2525
'src/ng/parse.js',
2626
'src/ng/q.js',
27-
'src/ng/resource.js',
2827
'src/ng/route.js',
2928
'src/ng/routeParams.js',
3029
'src/ng/rootScope.js',
@@ -67,6 +66,7 @@ angularFiles = {
6766
],
6867

6968
'angularSrcModules': [
69+
'src/ngResource/resource.js',
7070
'src/ngMock/angular-mocks.js'
7171
],
7272

@@ -98,6 +98,7 @@ angularFiles = {
9898
'test/ng/*.js',
9999
'test/ng/directive/*.js',
100100
'test/ng/filter/*.js',
101+
'test/ngResource/*.js',
101102
'test/ngMock/*.js'
102103
],
103104

@@ -134,8 +135,10 @@ angularFiles = {
134135
'lib/jasmine-jstd-adapter/JasmineAdapter.js',
135136
'build/angular.js',
136137
'src/ngMock/angular-mocks.js',
138+
'src/ngResource/resource.js',
137139
'test/matchers.js',
138140
'test/ngMock/*.js',
141+
'test/ngResource/*.js'
139142
],
140143

141144
'jstdPerf': [

docs/src/templates/docs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function TutorialInstructionsCtrl($cookieStore) {
146146
};
147147
}
148148

149-
angular.module('ngdocs', ['ngdocs.directives'], function($locationProvider, $filterProvider, $compileProvider) {
149+
angular.module('ngdocs', ['ngdocs.directives', 'ngResource'], function($locationProvider, $filterProvider, $compileProvider) {
150150
$locationProvider.html5Mode(true).hashPrefix('!');
151151

152152
$filterProvider.register('title', function(){

docs/src/templates/index.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
baseUrl = location.href.replace(rUrl, indexFile),
1919
jQuery = /index-jq[^\.]*\.html$/.test(baseUrl),
2020
debug = /index[^\.]*-debug\.html$/.test(baseUrl),
21-
angularPath = debug ? '../angular.js' : '../angular.min.js',
2221
headEl = document.getElementsByTagName('head')[0],
2322
sync = true;
2423

@@ -28,10 +27,15 @@
2827
type: 'text/css'});
2928
addTag('script', {src: 'syntaxhighlighter/syntaxhighlighter-combined.js'}, sync);
3029
if (jQuery) addTag('script', {src: 'jquery.min.js'});
31-
addTag('script', {src: angularPath}, sync);
30+
addTag('script', {src: path('angular.js')}, sync);
31+
addTag('script', {src: path('angular-resource.js') }, sync);
3232
addTag('script', {src: 'docs-combined.js'}, sync);
3333
addTag('script', {src: 'docs-keywords.js'}, sync);
3434

35+
function path(name) {
36+
return '../' + name.replace(/\.js$/, debug ? '.js' : '.min.js');
37+
}
38+
3539
function addTag(name, attributes, sync) {
3640
var el = document.createElement(name),
3741
attrName;

src/ngResource/resource.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ angular.module('ngResource', ['ng']).
215215
'remove': {method:'DELETE'},
216216
'delete': {method:'DELETE'}
217217
};
218-
var forEach = angular.forEach,
218+
var noop = angular.noop,
219+
forEach = angular.forEach,
219220
extend = angular.extend,
220221
copy = angular.copy,
221222
isFunction = angular.isFunction,

0 commit comments

Comments
 (0)