Merge pull request #97 from cse110-fa22-group29/add-js-docs

Add JSDoc
This commit is contained in:
rheabhutada02 2022-11-29 14:25:44 -08:00 committed by GitHub
commit 68020ccae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 1 deletions

View File

@ -29,8 +29,18 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install apt updates
run: sudo apt -y update; sudo apt -y upgrade;
- name: Install prerequisites
uses: actions/setup-node@v3
with:
node-version: 18
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install dependencies
run: sudo npm install
- name: Run tests
run: sudo npm run js-doc
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v2 uses: actions/configure-pages@v2
- name: Upload artifact - name: Upload artifact

23
.github/workflows/js-docs.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: JS Docs
on:
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Single deploy job since we're just deploying
test:
runs-on: ubuntu-latest
steps:
- name: Install apt updates
run: sudo apt -y update; sudo apt -y upgrade;
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: sudo npm install
- name: Run js-docs
run: sudo npm run js-docs

View File

@ -9,12 +9,14 @@
"lint-html": "htmlhint **/*.html", "lint-html": "htmlhint **/*.html",
"lint-css": "stylelint **/*.css", "lint-css": "stylelint **/*.css",
"fix-css": "stylelint --fix **/*.css", "fix-css": "stylelint --fix **/*.css",
"http-server": "http-server source" "http-server": "http-server source",
"js-doc": "jsdoc -d source/docs/ -r source/"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.27.0", "eslint": "^8.27.0",
"htmlhint": "1.1.4", "htmlhint": "1.1.4",
"http-server": "", "http-server": "",
"jsdoc": "^4.0.0",
"mocha": "10", "mocha": "10",
"mock-local-storage": "^1.1.23", "mock-local-storage": "^1.1.23",
"puppeteer": "^18.2.1", "puppeteer": "^18.2.1",

View File

@ -0,0 +1,17 @@
# Use JSDoc for JS documentation
- Status: accept
- Deciders: Arthur Lu, Marc Reta
- Date: 11 / 29 / 22
## Decision Drivers
- Need simple way to publish documentation for code
- Already documentating infile using JSDoc style
## Considered Options
- JSDoc
## Decision Outcome
Chosen Option: JSDoc. Will run by generating docs in /source/docs/ before publishing /source/ so users can enter the URI /docs/ to see documentation.