Move building single-file JS to use a JSON file with initial priority files
This commit is contained in:
parent
e88d88e427
commit
12f56787b0
8
Rakefile
8
Rakefile
@ -1,6 +1,10 @@
|
|||||||
|
require 'json'
|
||||||
|
|
||||||
def jasmine_sources
|
def jasmine_sources
|
||||||
sources = ["src/core/base.js", "src/core/util.js", "src/core/Env.js", "src/core/Reporter.js", "src/core/Block.js"]
|
first_sources = JSON.parse(File.read('src/SourcesList.json')).collect {|f| "src/core/#{f}"}
|
||||||
sources += Dir.glob('src/core/*.js').reject { |f| f == 'src/core/base.js' || sources.include?(f) }.sort
|
|
||||||
|
sources = first_sources
|
||||||
|
sources += Dir.glob('src/core/*.js').reject {|f| first_sources.include?(f)}.sort
|
||||||
sources
|
sources
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ jasmine.ExpectationResult = function(params) {
|
|||||||
this.actual = params.actual;
|
this.actual = params.actual;
|
||||||
this.message = this.passed_ ? 'Passed.' : params.message;
|
this.message = this.passed_ ? 'Passed.' : params.message;
|
||||||
|
|
||||||
var trace = params.trace || new Error(this.message);
|
var trace = (params.trace || new Error(this.message));
|
||||||
this.trace = this.passed_ ? '' : trace;
|
this.trace = this.passed_ ? '' : trace;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2468,5 +2468,5 @@ jasmine.version_= {
|
|||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 1,
|
"minor": 1,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 1307334045
|
"revision": 1307335480
|
||||||
};
|
};
|
||||||
|
7
src/SourcesList.json
Normal file
7
src/SourcesList.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
"base.js",
|
||||||
|
"util.js",
|
||||||
|
"Env.js",
|
||||||
|
"Reporter.js",
|
||||||
|
"Block.js"
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user