Skip to content

Commit

Permalink
Tools: Added support for two TypeDoc themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bre1470 authored and TorsteinHonsi committed Sep 27, 2019
1 parent 8891b47 commit c082950
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
32 changes: 27 additions & 5 deletions tools/gulptasks/tsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ const path = require('path');
*
* */

// const SOURCE_CONFIG = path.join('ts', 'tsconfig.json');
const INTERNAL_TARGET = path.join('build', 'api-internals');

const TARGET_DIRECTORY = path.join('build', 'api-internals');
const INTERNAL_THEME = path.join(
'node_modules', 'highcharts-documentation-generators', 'typedoc',
'theme-internals'
);

// const TARGET_JSON = path.join(TARGET_DIRECTORY, 'tree-typescript.json');
const NEXT_TARGET = path.join('build', 'api-next');

const NEXT_THEME = path.join(
'node_modules', 'highcharts-documentation-generators', 'typedoc',
'theme-next'
);

/* *
*
Expand All @@ -29,11 +37,25 @@ const TARGET_DIRECTORY = path.join('build', 'api-internals');
*/
function task() {

const argv = require('yargs').argv;
const processLib = require('./lib/process');

const command = 'cd ts && npx typedoc' + (
argv.next ?
` --json "${path.join('..', NEXT_TARGET, 'tree.json')}"` +
` --out "${path.join('..', NEXT_TARGET)}"` +
` --theme "${path.join('..', NEXT_THEME)}"` :
` --json "${path.join('..', INTERNAL_TARGET, 'tree.json')}"` +
` --out "${path.join('..', INTERNAL_TARGET)}"` +
` --theme "${path.join('..', INTERNAL_THEME)}"`
);

return processLib
.exec('cd ts && npx typedoc --out ../' + TARGET_DIRECTORY)
.then(() => processLib.openAppFor('build/api-internals/index.html'));
.exec(command)
.then(() => processLib.openAppFor(
path.join((argv.next ? NEXT_TARGET : INTERNAL_TARGET), 'index.html')
));

/*
const generators = require('highcharts-documentation-generators');
const log = require('./lib/log');
Expand Down
5 changes: 3 additions & 2 deletions ts/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"disableOutputCheck": true,
"excludeExternals": true,
"excludeNotExported": false,
"excludePrivate": true,
"excludeProtected": true,
"ignoreCompilerErrors": false,
"includeDeclarations": false,
"listInvalidSymbolLinks": true,
"entryPoint": "__global.Highcharts",
"gitRevision": "master",
"includes": ".",
"mode": "file",
"name": "Highcharts Internals",
"plugin": "none",
"readme": "none",
"theme": "../node_modules/highcharts-documentation-generators/typedoc/theme-internals"
"readme": "none"
}

0 comments on commit c082950

Please sign in to comment.