Skip to content
Browse files

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

… files
  • Loading branch information...
1 parent e88d88e commit 12f56787b0788bf9a5d5b782f5e013202f504290 Davis W. Frank committed Jun 5, 2011
Showing with 15 additions and 4 deletions.
  1. +6 −2 Rakefile
  2. +2 −2 lib/jasmine.js
  3. +7 −0 src/SourcesList.json
View
8 Rakefile
@@ -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
4 lib/jasmine.js
@@ -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
};
View
7 src/SourcesList.json
@@ -0,0 +1,7 @@
+[
+ "base.js",
+ "util.js",
+ "Env.js",
+ "Reporter.js",
+ "Block.js"
+]

0 comments on commit 12f5678

Please sign in to comment.
Something went wrong with that request. Please try again.