- Install as a dev dependency
$ npm i --save-dev @athombv/jsdoc-template- Create
./jsdoc.json:
{
"opts": {
"mainpagetitle": "🚨 Your Project Name",
"template": "./node_modules/@athombv/jsdoc-template"
},
"source": {
"include": [
"./README.md",
"./lib",
"./index.js"
]
},
"plugins": [
"plugins/markdown"
],
"templates": {
"default": {
"outputSourceFiles": false
}
}
}This is the recommended approach of integrating this template in your project, additional to the steps above.
$ npm i --save-dev concurrently jsdoc jsdoc-ts-utils serve watch- Add scripts to
package.json
{
"scripts": {
"serve": "concurrently \"serve build/\" \"npm run jsdoc:watch\"",
"build": "npm ci; npm run jsdoc:clean; npm run jsdoc;",
"jsdoc": "jsdoc --configure ./jsdoc.json --destination ./jsdoc/",
"jsdoc:clean": "rm -rf ./build",
"jsdoc:watch": "watch \"npm run jsdoc:clean && npm run jsdoc\" ./lib docs"
}
}-
Clone this repository
-
Link this repository to your current project by:
npm link @athombv/jsdoc-templateYou have to relink the repository each time after you run
npm install
- Bump the version on
mastervia the Version workflow. - Merge
mastertoproduction- this will automatically publish the release to npmjs.org via OIDC (Trusted Publisher). - Create PRs in dependent repos via the Update Dependents workflow. This will automatically discover repos in the
athombvorg that use@athombv/jsdoc-templateand open PRs to update them to the new version.
To add an alternative cname host for Simple Analytics add the following rule to jsdoc.json or jsdocrc.json
{
"opts": {
"simpleAnalyticsHost": "your-host.extension"
}
}If you want to add batches a.o elements like images/ video in top of the readme.md it will break the large intro paragraph. Wrap your intro elements in <header> tags to avoid this.
Example
readme.md
<header>
# Your heading
batches/images/etc
</header>
My first large paragraph