declare 'db' var in both functions

modified:   tasks/couchapp.js

added 'db' to the var list in grunt.registerMultiTask("rmcouchdb",...)
and grunt.registerMultiTask("mkcouchdb",..).

Also, Emacs got rid of some white space.  Sorry about that bit of
extraneous patching.
This commit is contained in:
James E. Marca 2013-10-16 13:17:10 -07:00
parent d0f8fb3d21
commit ec656e9c65
1 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ module.exports = function(grunt) {
}); });
grunt.registerMultiTask("rmcouchdb", "Delete a Couch Database", function() { grunt.registerMultiTask("rmcouchdb", "Delete a Couch Database", function() {
var done, parts, nano, dbname, _this; var done, parts, nano, dbname, _this, db;
_this = this; _this = this;
done = this.async(); done = this.async();
db = genDB(this.data.db); db = genDB(this.data.db);
@ -72,7 +72,7 @@ module.exports = function(grunt) {
} }
} }
return done(err, null); return done(err, null);
}); });
} else { } else {
grunt.log.writeln("No database specified... skipping."); grunt.log.writeln("No database specified... skipping.");
return done(null, null); return done(null, null);
@ -84,7 +84,7 @@ module.exports = function(grunt) {
}); });
grunt.registerMultiTask("mkcouchdb", "Make a Couch Database", function() { grunt.registerMultiTask("mkcouchdb", "Make a Couch Database", function() {
var done, parts, nano, dbname, _this; var done, parts, nano, dbname, _this, db;
_this = this; _this = this;
done = this.async(); done = this.async();
@ -106,7 +106,7 @@ module.exports = function(grunt) {
grunt.log.writeln("Database " + db.name + " created."); grunt.log.writeln("Database " + db.name + " created.");
return done(null, null); return done(null, null);
} }
}); });
} else { } else {
var err_msg = "No database specified to create!"; var err_msg = "No database specified to create!";
grunt.warn(err_msg); grunt.warn(err_msg);