Skip to content

Commit

Permalink
geosolutions-it#1475 Build TOC entry manually
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandinand committed Feb 27, 2017
1 parent 88c134a commit 8ebbf52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions genDocs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var fs = require('fs');
var path = require('path');
var docsToMarkdown = require('react-docs-markdown');
var reactDocs = require('react-docgen');
var toc = require('markdown-toc');
var filelist = [];

var walkSync = function(dir, outdir, filelist) {
Expand Down Expand Up @@ -51,7 +50,7 @@ function checkExt(file, ext, outdir, docList) {
buildDocs(reactDocs.parse(data), file, outdir);
// Build TOC entry
var name = getComponentName(file);
var tocString = toc('# ' + name + '\n\n').content + '\n';
var tocString = '- ['+ name + '](' + name + ')\n';
fs.appendFile(path.join(outdir, 'index.md'), tocString, function(err) {
if (err) {
return console.log(err);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"karma-webpack": "2.0.2",
"less": "2.7.1",
"less-loader": "2.2.3",
"markdown-toc": "1.1.0",
"mkdirp": "0.5.1",
"mocha": "2.4.5",
"ncp": "2.0.0",
Expand Down

0 comments on commit 8ebbf52

Please sign in to comment.