Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSDoc Infrastructure #103

Merged
merged 11 commits into from
Aug 5, 2020
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ The Jest testing framework was installed as a dependency. From the command line,
### Backend:
JUnit and Maven is used to run backend testing, following the same structure as Week 5 of the Google STEP Internship.

## Generating JSDoc
JSDoc 3 is used to generate documentation for all JS source code for this
project. To generate the docs for this project, run (from anywhere inside the
project directory):
```
npm run docs
```
The generated documentation will live in the directory `frontend/docs`.
The configuration rules for the JSDoc generation are specified in
`/frontend/.jsdoc.conf.json`.

## Running Locally
First, ensure that you have installed and are using Node 10!
```
Expand Down
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# generated JSDoc
/docs
22 changes: 22 additions & 0 deletions frontend/.jsdoc.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"plugins": ["plugins/markdown"],
"recurseDepth": 10,
"opts": {
"recurse": true,
"destination": "./docs/"
},
"source": {
"include": ["src"],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "node_modules"
},
"sourceType": "module",
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc", "closure"]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
136 changes: 136 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"local": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"docs": "./node_modules/.bin/jsdoc src -r -c ./.jsdoc.conf.json -d docs"
},
"engines": {
"node": "10.x.x"
Expand All @@ -44,5 +45,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"jsdoc": "~3.6.5"
}
}