Skip to content

Commit

Permalink
fix doc generate
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Nov 2, 2023
1 parent 8f1d9fe commit b52b3d5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions examples/typescript/.parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "@parcel/config-default",
"resolvers": [
"parcel-resolver-ignore",
"..."
]
}
2 changes: 1 addition & 1 deletion examples/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example has example code in `src/index.ts` which is called in the `index.html`. We are using Parcel to bundle resulting files for simplicity here.

**NOTE:** This example is linked to the documentation generated from the source code. You could remove such dependency if necessary by remove `./docs/index.html` from `src/index.html` if you need so. NPM commands used below will generate documentation as well.
**NOTE:** This example is linked to the documentation generated from the source code. You could remove such dependency if necessary by remove `./docs/index.html` from `src/index.html` if you need so. NPM commands used below will generate documentation as well.

## Testing it locally

Expand Down
8 changes: 6 additions & 2 deletions examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
"description": "This an example of using esptool-js with parcel and typescript",
"source": "src/index.html",
"scripts": {
"genDocs": "cd ../.. && npm run genDocs && mkdir -p examples/typescript/dist && cp -r docs examples/typescript/dist && cd examples/typescript",
"dev": "npm run genDocs && parcel src/index.html",
"genDocs": "cd ../.. && npm run build && npm run genDocs",
"build": "npm run clean && npm run genDocs && parcel build src/index.html --no-optimize --public-url ./",
"clean": "rimraf src/docs dist .parcel-cache",
"clean": "rimraf dist .parcel-cache",
"test": "echo \"Error: no test specified\" && exit 1"
},
"parcelIgnore": [
"./docs/.+"
],
"author": "",
"license": "ISC",
"devDependencies": {
"parcel": "^2.8.3",
"parcel-resolver-ignore": "^2.1.5",
"rimraf": "^4.1.2",
"typescript": "^4.9.4"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "npm run clean && tsc && rollup --config",
"clean": "rimraf lib bundle.js .parcel-cache",
"format": "prettier --write \"src/**/*.ts\"",
"genDocs": "rimraf examples/typescript/src/docs && typedoc --out examples/typescript/src/docs",
"genDocs": "rimraf docs && typedoc",
"lint": "eslint . --ext .ts",
"lintAndFix": "eslint . --ext .ts --fix",
"prepare": "npm run build",
Expand Down

0 comments on commit b52b3d5

Please sign in to comment.