Skip to content

Commit

Permalink
Merge pull request #103 from googleinterns/jsdoc-infra
Browse files Browse the repository at this point in the history
JSDoc Infrastructure
  • Loading branch information
zghera authored Aug 5, 2020
2 parents c70223b + 2d05ca7 commit ec194a6
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 1 deletion.
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"
}
}

0 comments on commit ec194a6

Please sign in to comment.