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

Add basic reference generation with typedoc #3

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
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
218 changes: 218 additions & 0 deletions package-lock.json

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

9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "0.0.1",
"description": "CARTO Web SDK",
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/CartoDB/web-sdk.git"
},
"author": "",
"license": "BSD-3-Clause",
"main": "dist/cjs/index.js",
Expand All @@ -22,6 +26,8 @@
"build:cjs": "BABEL_ENV=COMMONJS npx babel --source-maps --config-file ./babel.config.js --out-dir dist/cjs --extensions '.ts' ./src",
"build:umd": "webpack --config webpack.config.js",
"build:watch": "webpack --config webpack.config.js --watch ",
"build:docs": "npm run docs:reference",
"docs:reference": "rimraf docs/api && npx typedoc --options typedoc.js",
"prewatch": "rimraf dist/",
"test": "jest --config jest.config.js",
"test:watch": "jest --watch"
Expand Down Expand Up @@ -66,6 +72,9 @@
"ts-loader": "^7.0.5",
"tslint": "^5.20.0",
"typescript": "3.8.3",
"typedoc": "next",
"typedoc-plugin-external-module-name": "^4.0.3",
"typedoc-plugin-markdown": "^2.3.1",
"webpack": "^4.42.0",
"webpack-bundle-analyzer": "^3.7.0",
"webpack-cli": "^3.3.11"
Expand Down
25 changes: 25 additions & 0 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Configuration for reference, auto-generated from .ts files and their tsdoc comments
*/
module.exports = {
// excludeNotDocumented: true,
exclude: ['**/node_modules/**/*.ts', '**/__tests__/**/*', '**/*.types.ts'],
excludeExternals: true,
excludeNotExported: true,
excludePrivate: true,
excludeProtected: true,
inputFiles:
ignoreCompilerErrors: false,
listInvalidSymbolLinks: true,
mode: 'library',
// mode: 'file',
module: 'es2015',
name: '@carto/web-sdk',
// out: './docs/api', // default
out: './docs/api-lib', // libraty
// out: './docs/api-file', // file
plugin: 'none',
target: 'es6',
theme: 'default',
tsconfig: './tsconfig.json'
};