mipatterson / typedoc-plugin-pages

A TypeDoc plugin that lets you integrate your own pages into the documentation output
Apache License 2.0
37 stars 21 forks source link

can't generetae the doc following the Quick Start #12

Closed yboujraf closed 3 years ago

yboujraf commented 4 years ago

Dear @mipatterson

I followed your tutorial to install your plugin but still with an error during the execution of the script :

$ npm run docs:pages

> @by-research/smh-template-connector-lib@0.0.0-development docs:pages C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib
> npx typedoc --options ./typedoc/typedoc-config-pages.ts

Loaded plugin C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc-neo-theme
Loaded plugin C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc-plantuml
Loaded plugin C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc-plugin-external-module-name
Loaded plugin C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc-plugin-markdown
Loaded plugin C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc-plugin-pages

Using TypeScript 3.8.3 from C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typescript\lib
internal/fs/utils.js:230
    throw err;
    ^

Error: ENOENT: no such file or directory, stat 'C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc-plugin-markdown\dist\resources\assets'
    at Object.statSync (fs.js:982:3)
    at Object.statSync (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\graceful-fs\polyfills.js:307:34)
    at getStatsSync (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\fs-extra\lib\util\stat.js:58:18)
    at Object.checkPathsSync (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\fs-extra\lib\util\stat.js:90:33)
    at Object.copySync (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\fs-extra\lib\copy-sync\copy-sync.js:24:38)
    at AssetsPlugin.onRendererBegin (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc\dist\lib\output\plugins\AssetsPlugin.js:28:16)
    at C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\events.js:259:33
    at triggerApi (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\events.js:110:13)
    at Renderer.trigger (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\events.js:252:13)
    at Renderer.render (C:\Git\by-research\smh - connectors\smh-connector-lib\smh-template-connector-lib\node_modules\typedoc\dist\lib\output\renderer.js:33:14) {
  errno: -4058,
  syscall: 'stat',
  code: 'ENOENT',
  path: 'C:\\Git\\by-research\\smh - connectors\\smh-connector-lib\\smh-template-connector-lib\\node_modules\\typedoc-plugin-markdown\\dist\\resources\\assets'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @by-research/smh-template-connector-lib@0.0.0-development docs:pages: `npx typedoc --options ./typedoc/typedoc-config-pages.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @by-research/smh-template-connector-lib@0.0.0-development docs:pages script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ybouj\AppData\Roaming\npm-cache\_logs\2020-05-03T00_41_50_055Z-debug.log

typedoc-config-pages.ts

module.exports = {
    inputFiles: ['./src/'],
    out: './docs/dist/docs-pages/',
    readme: './README.md',
    name: 'Library project',
    listInvalidSymbolLinks: false,
    media: './docs/dist/docs-pages/static',
    theme: 'pages-plugin'
};

I am using :

        "typedoc": "^0.17.6",
        "typedoc-clarity-theme": "^1.1.0",
        "typedoc-default-themes": "^0.10.1",
        "typedoc-henanigans-theme": "^0.2.2",
        "typedoc-neo-theme": "^1.0.8",
        "typedoc-plantuml": "^1.4.1",
        "typedoc-plugin-markdown": "^2.2.17",
        "typedoc-plugin-pages": "^1.0.0",
        "typescript": "^3.8.3"

thanks if you could highlight me the correct direction.

Best Regards, Youssef

mipatterson commented 4 years ago

Hi @yboujraf,

It looks like you're also using the awesome typedoc-plugin-markdown plugin. If I recall correctly, that plugin only works with its own themes, which are what allow it to render the output as markdown. Since you're specifying the pages-plugin theme, the markdown plugin cannot correctly render. I was able to reproduce the issue locally. Because of how these two plugins function, I don't expect this workflow would ever be supported.

I also tried using these plugins together, using the markdown theme. Things are still broken, but I was able to make a few tweaks to start to get things working. I will do some more investigation to see if this is something I want to support in this plugin. Perhaps a "markdownMode" that would allow the pages to be rendered correctly when using this plugin in tandem with the markdown plugin? The only trick is how to support navigation. That might be something best left to consumers to write their own themes...

In the meantime, if you would like to use this plugin, I would suggest trying to uninstall the typedoc-plugin-markdown plugin from your project.

yboujraf commented 4 years ago

Dear @mipatterson

scripts to run typedoc

I have some scripts in my package.json :

One of them is to generate markdown document.

        "docs:bitbucket": "rimraf ./docs/dist/bitbucket && npx typedoc --options ./typedoc/typedoc-config-bitbucket.ts",

I have a typedoc-config.ts per type of plugin I need to use for type doc

module.exports = {
    inputFiles: ['./src/'],
    mode: 'file',
    includeDeclarations: true,
    tsconfig: 'tsconfig.json',
    out: './docs/dist/docs-bitbucket/',
    excludePrivate: false,
    excludeProtected: false,
    excludeExternals: true,
    readme: './README.md',
    name: 'Probel SW-P-8 protocol Library',
    ignoreCompilerErrors: true,
    plugin: 'typedoc-plugin-markdown',
    listInvalidSymbolLinks: true,
    entryPoint: 'index',
    categorizeByGroup: true,
    media: './medias',
    gitRemote: 'remote',
    gitRevision: 'revision',
    theme: 'bitbucket'
};

I don't know If I could do the same with yours plugin.

I am not using the command "typedoc" for generating docs.

html and/or markdown

is ther a way to generate the markdown &/or html in your plugin. It will be awsome? Then no issue to combine many plugins.

release version

I used your last commit yesterday to be able to use the plugin without errors. Because the npm was not up-to-date but I think you released yesterday for a new version. Is it right. So I can use npm install instead to build your repo and copy the plugin into node_modules.

Best Regards, Youssef Best Regards, Youssef

yboujraf commented 4 years ago

Dear @mipatterson

When I remove the typedoc-plugin-markdown, I canuse your plugin to render my doc.

I opened an issue : typedoc-plugin-markdown

Best Regards, Youssef

mipatterson commented 3 years ago

I'm going to close this issue, since this plugin was designed for the standard HTML TypeDoc output. I'm concerned that trying to chase every type of possible markup output would be too time consuming.