You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include assets in specific directories, e.g. .github
TL;DR - When using the jsdoc npm command, .github/ works locally but not when published to https://www.npmjs.com. In other words, the local path .github/docs/my-image.svg works when displaying the image locally or on GitHub, but it fails on https://www.npmjs.com/package/my-package because the asset(s) aren't copied over to the docs/ directory, nor is the markdown URL path rewritten from local to absolute (though this could be meditated if the local path would work).
Input code
My current config
{
"source": {
"include": [ "src", "bin", "config/jsdoc.shim.js", ".github/docs/**" ],
"includePattern": "\\.[jt]sx?$"
},
"opts": {
"destination": "./docs",
"readme": "./ReadMe.md",
"template": "node_modules/docdash"
},
"tags": {
"allowUnknownTags": true
},
"templates": {
"default": {
"includeDate": false
}
},
"plugins": [
"config/jsdoc.fix-ts-type-defs-plugin.js",
"node_modules/better-docs/typescript",
"node_modules/better-docs/typedef-import"
],
"markdown": {
"idInHeadings": true
},
"docdash": {
"sort": false,
"sectionOrder": [
"Modules",
"Namespaces",
"Classes"
],
"typedefs": false,
"meta": {
"title": "Documentation",
"description": "MockRequests will mock both XMLHttpRequest and fetch such that any requested URL will return the specified mock object instead of actually making an async request. URLs not configured will be unaffected and still trigger an async request as normal.",
"keyword": "request HTTP requests XMLHttpRequest fetch mock mocks network"
},
"menu": {
"Demo": {
"href": "./demo"
},
"npm": {
"href": "https://www.npmjs.com/package/mock-requests"
},
"GitHub": {
"href": "https://github.com/D-Pow/mock-requests"
}
}
}
}
// use config file above in ./config/jsdoc.config.json// package.json"myCommand": "jsdoc -c config/jsdoc.config.json"
JSDoc configuration
Use code above.
Expected behavior
I would expect any local path to be added to the final output, including if my website is published elsewhere.
Current behavior
The ReadMe/Markdown paths only work on GitHub itself, not if published elsewhere because the image assets aren't copied over to the "docs" dir (in this case due to opts.destination: ./docs in the config file).
Your environment
Any.
The text was updated successfully, but these errors were encountered:
Include assets in specific directories, e.g. .github
TL;DR - When using the
jsdoc
npm command,.github/
works locally but not when published to https://www.npmjs.com. In other words, the local path.github/docs/my-image.svg
works when displaying the image locally or on GitHub, but it fails on https://www.npmjs.com/package/my-package because the asset(s) aren't copied over to thedocs/
directory, nor is the markdown URL path rewritten from local to absolute (though this could be meditated if the local path would work).Input code
My current config
{ "source": { "include": [ "src", "bin", "config/jsdoc.shim.js", ".github/docs/**" ], "includePattern": "\\.[jt]sx?$" }, "opts": { "destination": "./docs", "readme": "./ReadMe.md", "template": "node_modules/docdash" }, "tags": { "allowUnknownTags": true }, "templates": { "default": { "includeDate": false } }, "plugins": [ "config/jsdoc.fix-ts-type-defs-plugin.js", "node_modules/better-docs/typescript", "node_modules/better-docs/typedef-import" ], "markdown": { "idInHeadings": true }, "docdash": { "sort": false, "sectionOrder": [ "Modules", "Namespaces", "Classes" ], "typedefs": false, "meta": { "title": "Documentation", "description": "MockRequests will mock both XMLHttpRequest and fetch such that any requested URL will return the specified mock object instead of actually making an async request. URLs not configured will be unaffected and still trigger an async request as normal.", "keyword": "request HTTP requests XMLHttpRequest fetch mock mocks network" }, "menu": { "Demo": { "href": "./demo" }, "npm": { "href": "https://www.npmjs.com/package/mock-requests" }, "GitHub": { "href": "https://github.com/D-Pow/mock-requests" } } } }
JSDoc configuration
Use code above.
Expected behavior
I would expect any local path to be added to the final output, including if my website is published elsewhere.
Current behavior
The ReadMe/Markdown paths only work on GitHub itself, not if published elsewhere because the image assets aren't copied over to the "docs" dir (in this case due to
opts.destination: ./docs
in the config file).Your environment
Any.
The text was updated successfully, but these errors were encountered: