Move building single-file JS to use a JSON file with initial priority files

This commit is contained in:
Davis W. Frank 2011-06-05 21:55:32 -07:00
parent e88d88e427
commit 12f56787b0
3 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,10 @@
require 'json'
def jasmine_sources
sources = ["src/core/base.js", "src/core/util.js", "src/core/Env.js", "src/core/Reporter.js", "src/core/Block.js"]
sources += Dir.glob('src/core/*.js').reject { |f| f == 'src/core/base.js' || sources.include?(f) }.sort
first_sources = JSON.parse(File.read('src/SourcesList.json')).collect {|f| "src/core/#{f}"}
sources = first_sources
sources += Dir.glob('src/core/*.js').reject {|f| first_sources.include?(f)}.sort
sources
end

View File

@ -99,7 +99,7 @@ jasmine.ExpectationResult = function(params) {
this.actual = params.actual;
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;
};
@ -2468,5 +2468,5 @@ jasmine.version_= {
"major": 1,
"minor": 1,
"build": 0,
"revision": 1307334045
"revision": 1307335480
};

7
src/SourcesList.json Normal file
View File

@ -0,0 +1,7 @@
[
"base.js",
"util.js",
"Env.js",
"Reporter.js",
"Block.js"
]