From 2d51b4ee49fa8a8d4e038f9d0ba65ec523faae62 Mon Sep 17 00:00:00 2001 From: Grzegorz Niewisiewicz Date: Fri, 13 Jun 2014 00:17:17 +0200 Subject: [PATCH 1/2] Fix the install target This commit fixes two problems related to cake install. Firstly it was assumed that the prefix directory contains a subdirectory named bin. When it didn't exist the script failed when creating a symlink to docco. The problem is fixed by creating the bin subdirectory. Secondly an attempt to install (i.e. cp -rf) a directory named lib was made. However the project doesn't contain such subdirectory. It was removed from the list of directories to copy. --- Cakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cakefile b/Cakefile index 6bffe0d0..e451132c 100644 --- a/Cakefile +++ b/Cakefile @@ -15,8 +15,8 @@ task 'install', 'install the `docco` command into /usr/local (or --prefix)', (op base = options.prefix or '/usr/local' lib = base + '/lib/docco' exec([ - 'mkdir -p ' + lib - 'cp -rf bin README resources lib ' + lib + 'mkdir -p ' + lib + ' ' + base + '/bin' + 'cp -rf bin README resources ' + lib 'ln -sf ' + lib + '/bin/docco ' + base + '/bin/docco' ].join(' && '), (err, stdout, stderr) -> if err then console.error stderr From d4042b2d66761af3ae0fcecfc555d8493711c1ce Mon Sep 17 00:00:00 2001 From: Grzegorz Niewisiewicz Date: Fri, 13 Jun 2014 00:30:33 +0200 Subject: [PATCH 2/2] Fix the -m/--marked option The argument to -m/--marked is a JSON file name containing additional optins that should be passed to Marked. The problem was that the default value of the command line option, as specified in the defaults objects, was set to an empty object which definitely isn't a valid file name. The result was an attempt to fs.readFileSync({}) which obviously raised an exception. This commit fixes the problem by setting the default value of -m/--marked to null. --- docco.js | 2 +- docco.litcoffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docco.js b/docco.js index 82976931..36b7781b 100644 --- a/docco.js +++ b/docco.js @@ -161,7 +161,7 @@ css: null, extension: null, languages: {}, - marked: {} + marked: null }; configure = function(options) { diff --git a/docco.litcoffee b/docco.litcoffee index c236bf7b..ae7f279b 100644 --- a/docco.litcoffee +++ b/docco.litcoffee @@ -225,7 +225,7 @@ user-specified options. css: null extension: null languages: {} - marked: {} + marked: null **Configure** this particular run of Docco. We might use a passed-in external template, or one of the built-in **layouts**. We only attempt to process