Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ module.exports = {
'jsdoc/newline-after-description': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/tag-lines': 'off',
'array-bracket-newline': 'off',
'array-element-newline': 'off',
'array-type': 'off',
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build
on:
push:
branches:
- main
pull_request:

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "22.22.2"
architecture: "x64" # fix for macos-latest
- run: npm install
- run: npm run build
- run: npm run lint
- run: npm run test
- run: npm run testdocs
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.3]

### Fixed

- Wrong file in package.json

## [0.7.2]

### Added
Expand Down
49 changes: 22 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ Docs are output in docs folder.
1. Install via NPM

```
npm install brighterscript-jsdocs-plugin --save-dev
npm install --save-dev brighterscript-jsdocs-plugin
```

I recommend using a custom template. I like https://github.com/braintree/jsdoc-template:

```
npm install braintree-jsdoc-template --save-dev
```
I recommend using a [custom template](#templates).

2. Configure

Expand All @@ -39,24 +35,25 @@ Example:

```jsonc
{
"plugins": [
"plugins/markdown",
"./node_modules/brighterscript-jsdocs-plugin/convert-brighterscript-docs.js"
"plugins": [
"plugins/markdown",
"./node_modules/brighterscript-jsdocs-plugin/convert-brighterscript-docs.js",
],
"source": {
"include": [
"src", // directories with .bs/.brs files
],
"source": {
"include": [
"src" // directories with .bs/.brs files
],
"includePattern": ".+\\.br?s$"
"includePattern": ".+\\.br?s$",
},
"opts": {
"recurse": true,
"readme": "README.md", // Your README file to be rendered on the docs home page
"template": "./node_modules/docdash", // or whatever template you've chosen - see below
"brighterscript-jsdocs-plugin": {
"addModule": true, // true by default - should we generate module names based on the file names?
"escapeHTMLCharacters": false, // false by default - should we escape html characters (<>/&") in comments?
},
"opts": {
"recurse": true,
"template": "node_modules/clean-jsdoc-theme", // or whatever template you've chosen - see below
"brighterscript-jsdocs-plugin": {
"addModule": true, // true by default - should we generate module names based on the file names?
"escapeHTMLCharacters": true // true by default - should we escape html characters (<>/&") in comments?
}
}
},
}
```

Expand All @@ -78,7 +75,7 @@ addModule
: Boolean (`true`/`false`) - Should we generate module names based on the file names? - defaults to `true`

escapeHTMLCharacters
: Boolean (`true`/`false`) - Should we escape html characters (`<>/&"'`) in comments? - defaults to `true`
: Boolean (`true`/`false`) - Should we escape html characters (`<>/&"'`) in comments? - defaults to `false`

# Generating Documentation

Expand All @@ -88,13 +85,11 @@ Run the script to generate documentation! (Documentation is put in the `./docs/`
npm run docs
```

# Templates
# <a name="templates"></a>Templates

The default JSDocs template may not meet your needs. Here's a good list of templates that are available:

https://cancerberosgx.github.io/jsdoc-templates-demo/demo/

I recommend [clean-jsdoc-theme](https://github.com/ankitskvmdam/clean-jsdoc-theme)
[JSDoc 4 Templates](https://gist.github.com/coolaj86/49d3d804b2883d763d5f8be4d4a0eb73#file-jsdoc-template-themes-md)

# Brightscript and Brighterscript

Expand Down
6 changes: 4 additions & 2 deletions jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"opts": {
"recurse": true,
"readme": "README.md",
"template": "node_modules/clean-jsdoc-theme",
"brighterscript-jsdocs-plugin": {}
"template": "./node_modules/docdash",
"brighterscript-jsdocs-plugin": {
"escapeHTMLCharacters": false
}
}
}
Loading