mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-19 12:01:07 +00:00
chore(resource): moved to module
This commit is contained in:
parent
8218c4b60b
commit
798bca62c6
5 changed files with 17 additions and 5 deletions
4
Rakefile
4
Rakefile
|
|
@ -80,10 +80,12 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter] do
|
||||||
'src/loader.suffix'])
|
'src/loader.suffix'])
|
||||||
|
|
||||||
FileUtils.cp 'src/ngMock/angular-mocks.js', path_to('angular-mocks.js')
|
FileUtils.cp 'src/ngMock/angular-mocks.js', path_to('angular-mocks.js')
|
||||||
|
FileUtils.cp 'src/ngResource/resource.js', path_to('angular-resource.js')
|
||||||
|
|
||||||
|
|
||||||
closureCompile('angular.js')
|
closureCompile('angular.js')
|
||||||
closureCompile('angular-loader.js')
|
closureCompile('angular-loader.js')
|
||||||
|
closureCompile('angular-resource.js')
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -113,6 +115,8 @@ task :package => [:clean, :compile, :docs] do
|
||||||
path_to('angular-loader.js'),
|
path_to('angular-loader.js'),
|
||||||
path_to('angular-loader.min.js'),
|
path_to('angular-loader.min.js'),
|
||||||
path_to('angular-mocks.js'),
|
path_to('angular-mocks.js'),
|
||||||
|
path_to('angular-resource.js'),
|
||||||
|
path_to('angular-resource.min.js'),
|
||||||
path_to('angular-scenario.js'),
|
path_to('angular-scenario.js'),
|
||||||
path_to('jstd-scenario-adapter.js'),
|
path_to('jstd-scenario-adapter.js'),
|
||||||
path_to('jstd-scenario-adapter-config.js'),
|
path_to('jstd-scenario-adapter-config.js'),
|
||||||
|
|
|
||||||
5
angularFiles.js
vendored
5
angularFiles.js
vendored
|
|
@ -24,7 +24,6 @@ angularFiles = {
|
||||||
'src/ng/log.js',
|
'src/ng/log.js',
|
||||||
'src/ng/parse.js',
|
'src/ng/parse.js',
|
||||||
'src/ng/q.js',
|
'src/ng/q.js',
|
||||||
'src/ng/resource.js',
|
|
||||||
'src/ng/route.js',
|
'src/ng/route.js',
|
||||||
'src/ng/routeParams.js',
|
'src/ng/routeParams.js',
|
||||||
'src/ng/rootScope.js',
|
'src/ng/rootScope.js',
|
||||||
|
|
@ -67,6 +66,7 @@ angularFiles = {
|
||||||
],
|
],
|
||||||
|
|
||||||
'angularSrcModules': [
|
'angularSrcModules': [
|
||||||
|
'src/ngResource/resource.js',
|
||||||
'src/ngMock/angular-mocks.js'
|
'src/ngMock/angular-mocks.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -98,6 +98,7 @@ angularFiles = {
|
||||||
'test/ng/*.js',
|
'test/ng/*.js',
|
||||||
'test/ng/directive/*.js',
|
'test/ng/directive/*.js',
|
||||||
'test/ng/filter/*.js',
|
'test/ng/filter/*.js',
|
||||||
|
'test/ngResource/*.js',
|
||||||
'test/ngMock/*.js'
|
'test/ngMock/*.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -134,8 +135,10 @@ angularFiles = {
|
||||||
'lib/jasmine-jstd-adapter/JasmineAdapter.js',
|
'lib/jasmine-jstd-adapter/JasmineAdapter.js',
|
||||||
'build/angular.js',
|
'build/angular.js',
|
||||||
'src/ngMock/angular-mocks.js',
|
'src/ngMock/angular-mocks.js',
|
||||||
|
'src/ngResource/resource.js',
|
||||||
'test/matchers.js',
|
'test/matchers.js',
|
||||||
'test/ngMock/*.js',
|
'test/ngMock/*.js',
|
||||||
|
'test/ngResource/*.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
'jstdPerf': [
|
'jstdPerf': [
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ function TutorialInstructionsCtrl($cookieStore) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
angular.module('ngdocs', ['ngdocs.directives'], function($locationProvider, $filterProvider, $compileProvider) {
|
angular.module('ngdocs', ['ngdocs.directives', 'ngResource'], function($locationProvider, $filterProvider, $compileProvider) {
|
||||||
$locationProvider.html5Mode(true).hashPrefix('!');
|
$locationProvider.html5Mode(true).hashPrefix('!');
|
||||||
|
|
||||||
$filterProvider.register('title', function(){
|
$filterProvider.register('title', function(){
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
baseUrl = location.href.replace(rUrl, indexFile),
|
baseUrl = location.href.replace(rUrl, indexFile),
|
||||||
jQuery = /index-jq[^\.]*\.html$/.test(baseUrl),
|
jQuery = /index-jq[^\.]*\.html$/.test(baseUrl),
|
||||||
debug = /index[^\.]*-debug\.html$/.test(baseUrl),
|
debug = /index[^\.]*-debug\.html$/.test(baseUrl),
|
||||||
angularPath = debug ? '../angular.js' : '../angular.min.js',
|
|
||||||
headEl = document.getElementsByTagName('head')[0],
|
headEl = document.getElementsByTagName('head')[0],
|
||||||
sync = true;
|
sync = true;
|
||||||
|
|
||||||
|
|
@ -28,10 +27,15 @@
|
||||||
type: 'text/css'});
|
type: 'text/css'});
|
||||||
addTag('script', {src: 'syntaxhighlighter/syntaxhighlighter-combined.js'}, sync);
|
addTag('script', {src: 'syntaxhighlighter/syntaxhighlighter-combined.js'}, sync);
|
||||||
if (jQuery) addTag('script', {src: 'jquery.min.js'});
|
if (jQuery) addTag('script', {src: 'jquery.min.js'});
|
||||||
addTag('script', {src: angularPath}, sync);
|
addTag('script', {src: path('angular.js')}, sync);
|
||||||
|
addTag('script', {src: path('angular-resource.js') }, sync);
|
||||||
addTag('script', {src: 'docs-combined.js'}, sync);
|
addTag('script', {src: 'docs-combined.js'}, sync);
|
||||||
addTag('script', {src: 'docs-keywords.js'}, sync);
|
addTag('script', {src: 'docs-keywords.js'}, sync);
|
||||||
|
|
||||||
|
function path(name) {
|
||||||
|
return '../' + name.replace(/\.js$/, debug ? '.js' : '.min.js');
|
||||||
|
}
|
||||||
|
|
||||||
function addTag(name, attributes, sync) {
|
function addTag(name, attributes, sync) {
|
||||||
var el = document.createElement(name),
|
var el = document.createElement(name),
|
||||||
attrName;
|
attrName;
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,8 @@ angular.module('ngResource', ['ng']).
|
||||||
'remove': {method:'DELETE'},
|
'remove': {method:'DELETE'},
|
||||||
'delete': {method:'DELETE'}
|
'delete': {method:'DELETE'}
|
||||||
};
|
};
|
||||||
var forEach = angular.forEach,
|
var noop = angular.noop,
|
||||||
|
forEach = angular.forEach,
|
||||||
extend = angular.extend,
|
extend = angular.extend,
|
||||||
copy = angular.copy,
|
copy = angular.copy,
|
||||||
isFunction = angular.isFunction,
|
isFunction = angular.isFunction,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue