Skip to content

Commit

Permalink
fix(mdoc): Remove mdoc dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Mar 2, 2016
1 parent 9f9bd19 commit 44939b4
Show file tree
Hide file tree
Showing 40 changed files with 10 additions and 2,949 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"connect": "3.4.1",
"serve-static": "1.10.2",
"serve-index": "1.7.3",
"mdoc": "0.5.2",
"gh-pages": "0.10.0"
},
"devDependencies": {
Expand Down
28 changes: 10 additions & 18 deletions tools/doc-generator/doc-generator-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ if (!process.argv.slice(2).length) {
// Initialization
// ----------------------------------------------------------------------------

shell.rm('-rf', rootWWW);
shell.mkdir('-p', rootWWW);
shell.cd(process.env.PWD);

Expand Down Expand Up @@ -85,10 +84,8 @@ if(program.list || program.examples || program.stats) {
if(program.api || program.stats) {
console.log('\n=> Build API\n');

var rootTmp = path.join(process.env.PWD, 'documentation/_tmp');
var mdocTpl = path.join(__dirname, 'mdoc')
var rootTmp = path.join(process.env.PWD, 'documentation/www/source/api');

shell.rm('-rf', rootTmp);
shell.mkdir('-p', rootTmp);
shell.find('src')
.filter( function(file) {
Expand All @@ -110,21 +107,11 @@ if(program.api || program.stats) {

// Copy file
shell.cp('-f', file, newPath);
rm('-f', newPath);
echo('title: ' + className).to(newPath);
echo('---').toEnd(newPath);
cat(file).toEnd(newPath);
});

// Run mdoc
var log = console.log;
console.log = function(){};
require('mdoc').run({
inputDir: rootTmp,
outputDir: path.join(rootWWW,'api'),
templatePath: mdocTpl,
baseTitle : 'ParaViewWeb',
headingLevel : 2,
});
console.log = log;

shell.rm('-rf', rootTmp);
}

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -199,6 +186,11 @@ if(program.examples) {
doneWithProcessing();
}

// ----------------------------------------------------------------------------
// Generate website using Hexo
// ----------------------------------------------------------------------------



function doneWithProcessing() {

Expand Down
Loading

0 comments on commit 44939b4

Please sign in to comment.