From 9ac5c64b057ee3559e45dc3388666bd01bcf8ac4 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Tue, 3 Feb 2015 11:11:25 -0500 Subject: [PATCH] removing the silly extension crap -- it's a breaking change --- Cakefile | 2 +- docco.js | 2 +- docco.litcoffee | 2 +- index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cakefile b/Cakefile index a8668f3f..e451132c 100644 --- a/Cakefile +++ b/Cakefile @@ -26,7 +26,7 @@ task 'doc', 'rebuild the Docco documentation', (options) -> layout = options.layout or 'linear' exec([ "bin/docco --layout #{layout} docco.litcoffee" - "sed \"s/docco.css/resources\\/#{layout}\\/docco.css/\" < docs/docco.litcoffee.html > index.html" + "sed \"s/docco.css/resources\\/#{layout}\\/docco.css/\" < docs/docco.html > index.html" 'rm -r docs' ].join(' && '), (err) -> throw err if err diff --git a/docco.js b/docco.js index 914e0a06..de6aa418 100644 --- a/docco.js +++ b/docco.js @@ -134,7 +134,7 @@ write = function(source, sections, config) { var destination, first, firstSection, hasTitle, html, title; destination = function(file) { - return path.join(config.output, file + '.html'); + return path.join(config.output, path.basename(file, path.extname(file)) + '.html'); }; firstSection = _.find(sections, function(section) { return section.docsText.length > 0; diff --git a/docco.litcoffee b/docco.litcoffee index 95b4d7af..d15f3fa7 100644 --- a/docco.litcoffee +++ b/docco.litcoffee @@ -195,7 +195,7 @@ and rendering it to the specified output path. write = (source, sections, config) -> destination = (file) -> - path.join(config.output, file + '.html') + path.join(config.output, path.basename(file, path.extname(file)) + '.html') The **title** of the file is either the first heading in the prose, or the name of the source file. diff --git a/index.html b/index.html index 99ea7834..92c07120 100644 --- a/index.html +++ b/index.html @@ -238,7 +238,7 @@

Main Documentation Generation F
write = (source, sections, config) ->
 
   destination = (file) ->
-    path.join(config.output, file + '.html')
+ path.join(config.output, path.basename(file, path.extname(file)) + '.html')