From fc310cf07c2f6e26fdf8424c45a5295ea314bfcd Mon Sep 17 00:00:00 2001 From: Muhammed Moussa Date: Sun, 29 Aug 2021 12:26:42 +0200 Subject: [PATCH] docs(src): docs update doc generation script && typo --- .gitignore | 1 + jsdoc.json | 12 ++++++++++++ package.json | 4 +++- src/http/HTTPRequest.js | 1 - src/intention/Intention.js | 1 - src/utils/_getApiBaseUrl.js | 2 +- src/utils/_paymobLogger.js | 2 +- 7 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 jsdoc.json diff --git a/.gitignore b/.gitignore index deeb64d..56d4903 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist/*.js .env +docs \ No newline at end of file diff --git a/jsdoc.json b/jsdoc.json new file mode 100644 index 0000000..54b7a53 --- /dev/null +++ b/jsdoc.json @@ -0,0 +1,12 @@ +{ + "source": { + "includePattern": ".+\\.js(doc|x)?$", + "include": ["."], + "exclude": ["node_modules"] + }, + "recurseDepth": 10, + "opts": { + "destination": "./docs/", + "recurse": true + } +} diff --git a/package.json b/package.json index d984c01..4763888 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "build": "webpack --config webpack.config.js --mode=production", "dev": "npm run build && nodemon './src/paymob-marketplace'", "commit": "git-cz", - "local:server": "nodemon './src/paymob-marketplace'" + "local:server": "nodemon './src/paymob-marketplace'", + "generate:doc": "jsdoc -c './jsdoc.json'" + }, "repository": { "type": "git", diff --git a/src/http/HTTPRequest.js b/src/http/HTTPRequest.js index 17b1ae6..3c23b2a 100644 --- a/src/http/HTTPRequest.js +++ b/src/http/HTTPRequest.js @@ -4,7 +4,6 @@ import { requester } from "./_requester"; /** * Wanna a request!, it's HTTPRequest class. - * @export * @class HTTPRequest */ export class HTTPRequest { diff --git a/src/intention/Intention.js b/src/intention/Intention.js index 47c8c16..49c9db0 100644 --- a/src/intention/Intention.js +++ b/src/intention/Intention.js @@ -7,7 +7,6 @@ import { getApiBaseUrl, getApiVersion } from "../utils"; /** * Intention operations (create, update, patch, delete, retrieve, list) - * @export * @class Intention */ export class Intention { diff --git a/src/utils/_getApiBaseUrl.js b/src/utils/_getApiBaseUrl.js index 1689063..9846ebe 100644 --- a/src/utils/_getApiBaseUrl.js +++ b/src/utils/_getApiBaseUrl.js @@ -1,5 +1,5 @@ /** - * return current api version + * return current api domain * @name getApiBaseUrl * @return {*} */ diff --git a/src/utils/_paymobLogger.js b/src/utils/_paymobLogger.js index f631979..21c9c4b 100644 --- a/src/utils/_paymobLogger.js +++ b/src/utils/_paymobLogger.js @@ -1,5 +1,5 @@ /** - * paymonb logger util + * paymob logger util * @param {string} msg * @param {string} [level='log'] * @name paymobLogger