diff --git a/plugins/prettyPrintSource.js b/plugins/prettyPrintSource.js index bdb3ad59..3a0a76ae 100644 --- a/plugins/prettyPrintSource.js +++ b/plugins/prettyPrintSource.js @@ -1,3 +1,4 @@ +/*global env: true */ /** * @file Adds pretty printed source code to * the output files. @@ -49,7 +50,8 @@ exports.handlers = { sourceFileName = toRelativePath(sourceFileName); sourceFileName = relativePathToNamespace(sourceFileName); - return sourceFileName += extension; + sourceFileName = sourceFileName += extension; + return sourceFileName; } function getOutputDirectory() { @@ -71,12 +73,12 @@ exports.handlers = { var outputFileName = makeOutputFileName(e.filename); var sourceCode = e.source; - /*// Debug + /* print('source file name = ' + e.filename); print('output file name = ' + outputFileName); print('output directory = ' + outputDirectory); print('sourceCode = ' + sourceCode); - //*/ + */ // write source to file with a unique name generateHighlightedSourceFile(outputDirectory, outputFileName, sourceCode); diff --git a/templates/prettyPrintSource/publish.js b/templates/prettyPrintSource/publish.js index 0488e3ec..622e3994 100644 --- a/templates/prettyPrintSource/publish.js +++ b/templates/prettyPrintSource/publish.js @@ -30,12 +30,12 @@ exports.publish = function(outputDirectory, outputFileName, sourceCode) { var view = new template.Template(templatePath); var outputContent = view.render(templateName, templateData); - /*// Debug + /* console.log('templateData : ' + templateData); console.log('outputDirectory : ' + outputDirectory); console.log('outputFile : ' + outputFile); console.log('outputContent : ' + outputContent); - //*/ + */ fs.mkPath(outputDirectory); fs.writeFileSync(outputFile, outputContent); };