Whitespace

This commit is contained in:
Tim Schaub
2016-01-02 11:26:31 -07:00
parent 23f3e21ba4
commit 38d0e98ff5
4 changed files with 11 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ function getLinkToApiHtml(requires) {
var lis = requires.map(function(symb) {
var href = '../apidoc/' + symb + '.html';
return '<li><a href="' + href + '" title="API documentation for ' +
symb +'">' + symb + '</a></li>';
symb + '">' + symb + '</a></li>';
});
return '<ul class="inline">' + lis.join() + '</ul>';
}

View File

@@ -109,7 +109,7 @@ function getNewer(date, newer, callback) {
* pass the sourceDir to the task so it can do the walking.
*/
if (isWindows) {
paths = [sourceDir].concat(externsPaths);
paths = [sourceDir].concat(externsPaths);
}
callback(null, newer ? paths : []);

View File

@@ -44,7 +44,7 @@ var copyOpts = {
/**
* A small utility method printing out log messages.
*/
var log = function(msg){
var log = function(msg) {
process.stdout.write(msg + '\n');
};
@@ -56,10 +56,10 @@ var log = function(msg){
* adjusted to use path.join
*/
var deleteFolderRecursive = function(p) {
if( fs.existsSync(p) ) {
fs.readdirSync(p).forEach(function(file,index){
if (fs.existsSync(p)) {
fs.readdirSync(p).forEach(function(file,index) {
var curPath = path.join(p, file);
if(fs.lstatSync(curPath).isDirectory()) { // recurse
if (fs.lstatSync(curPath).isDirectory()) { // recurse
deleteFolderRecursive(curPath);
} else { // delete file
fs.unlinkSync(curPath);
@@ -73,7 +73,7 @@ var deleteFolderRecursive = function(p) {
* Creates folders for backup and instrumentation and copies the contents of the
* current src folder into them.
*/
var setupBackupAndInstrumentationDir = function(){
var setupBackupAndInstrumentationDir = function() {
if (!fs.existsSync(backupDir)) {
log('• create directory for backup of src: ' + backupDir);
fs.mkdirSync(backupDir);
@@ -95,7 +95,7 @@ var setupBackupAndInstrumentationDir = function(){
* backup over the src directory and removes the instrumentation and backup
* directory.
*/
var revertBackupAndInstrumentationDir = function(){
var revertBackupAndInstrumentationDir = function() {
log('• copy original src back to src folder');
wrench.copyDirSyncRecursive(backupDir, dir, copyOpts);
log('• delete backup directory');
@@ -120,7 +120,7 @@ var collectAndWriteCoverageData = function(code) {
revertBackupAndInstrumentationDir();
log('• write report from collected data');
reporter.write(collector, true, function () {
reporter.write(collector, true, function() {
process.exit(0);
});
};
@@ -168,7 +168,7 @@ var foundAllJavaScriptSourceFiles = function(err, files) {
* coverage process by gathering all JavaScript files and then instrumenting
* them.
*/
var main = function(){
var main = function() {
setupBackupAndInstrumentationDir();
glob(dir + '/**/*.js', {}, foundAllJavaScriptSourceFiles);
};
@@ -180,5 +180,3 @@ if (require.main === module) {
}
module.exports = main;

View File

@@ -82,7 +82,7 @@ function runTests(includeCoverage, callback) {
}
if (require.main === module) {
runTests(false, function(code){
runTests(false, function(code) {
process.exit(code);
});
}