Move to grunt for building all distribution files.

* canonical version number of jasmine-core is now is package.json
* `grunt buildDistribution` builds jasmine.js, jasmine-html.js, jasmine.css and outputs them to the dist dir
* `grunt buildStandaloneDist` builds the example spec runner files and compresses them to dist/jasmine-VERSION.zip
* `grunt compass` compiles jasmine.css
* jasmine.Env handling of version is backwards compatible, but uses the version string directly (and nicely deprecated)
* Ruby/thor tasks that did the above deleted
This commit is contained in:
Dan Hansen and Davis W. Frank
2013-03-01 16:13:45 -08:00
parent 6eecc562ff
commit e09fd40933
31 changed files with 622 additions and 1113 deletions

View File

@@ -204,11 +204,7 @@
};
jasmine.Env.prototype.version = function() {
if (this.jasmine.version_) {
return this.jasmine.version_;
} else {
throw new Error('Version not set');
}
return jasmine.version;
};
jasmine.Env.prototype.expect = function(actual) {
@@ -252,17 +248,8 @@
// TODO: move this to closure
jasmine.Env.prototype.versionString = function() {
if (!this.jasmine.version_) {
return "version unknown";
}
var version = this.version();
var versionString = version.major + "." + version.minor + "." + version.build;
if (version.release_candidate) {
versionString += ".rc" + version.release_candidate;
}
versionString += " revision " + version.revision;
return versionString;
console.log("DEPRECATED == use jasmine.version");
return jasmine.version;
};
// TODO: move this to closure

View File

@@ -16,7 +16,7 @@ jasmine.HtmlReporter = function(options) {
htmlReporterMain = createDom("div", {className: "html-reporter"},
createDom("div", {className: "banner"},
createDom("span", {className: "title"}, "Jasmine"),
createDom("span", {className: "version"}, env.versionString())
createDom("span", {className: "version"}, jasmine.version)
),
createDom("ul", {className: "symbol-summary"}),
createDom("div", {className: "alert"}),

View File

@@ -1,7 +1 @@
jasmine.version_= {
"major": 1,
"minor": 3,
"build": 1,
"revision": 1354556913
};
jasmine.version = "<%= version %>";

View File

@@ -1,5 +0,0 @@
{
"major": 1,
"minor": 3,
"build": 1
}