From f8350f9361296a84399fa0206d14d3029f3cafae Mon Sep 17 00:00:00 2001 From: mbernier Date: Thu, 26 Oct 2017 21:39:22 -0600 Subject: [PATCH 1/4] adding esdoc support --- .esdoc.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .esdoc.json diff --git a/.esdoc.json b/.esdoc.json new file mode 100644 index 000000000..36b0371d6 --- /dev/null +++ b/.esdoc.json @@ -0,0 +1,13 @@ +{ + "source": "./packages", + "destination": "./docs", + "plugins": [ + { + "name": "esdoc-coverage-plugin", + "option": { + "enable": true, + "kind": ["class", "method", "member", "get", "set", "constructor", "function", "variable"] + } + } + ] + } \ No newline at end of file From 0cd89b9e142b163c1ef9711daf4ed882af9d7bd2 Mon Sep 17 00:00:00 2001 From: mbernier Date: Thu, 26 Oct 2017 21:43:14 -0600 Subject: [PATCH 2/4] updated json package for esdoc --- package.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f38ee8886..ca0150080 100644 --- a/package.json +++ b/package.json @@ -34,5 +34,22 @@ "test:typescript": "tsc", "test": "npm run test:all -s", "coverage": "open -a \"Google Chrome\" ./coverage/lcov-report/index.html" - } + }, + "description": "![SendGrid Logo](https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png)", + "bugs": { + "url": "https://github.com/sendgrid/sendgrid-nodejs/issues" + }, + "homepage": "https://github.com/sendgrid/sendgrid-nodejs#readme", + "main": "index.js", + "directories": { + "doc": "docs", + "test": "test" + }, + "dependencies": { + "chai": "^2.3.0", + "esdoc": "^1.0.3", + "esdoc-coverage-plugin": "^1.1.0", + "esdoc-type-inference-plugin": "^1.0.1" + }, + "author": "SendGrid" } From 73ba7acece98326694d1f0d209c77b9bafe9503e Mon Sep 17 00:00:00 2001 From: mbernier Date: Thu, 26 Oct 2017 21:50:13 -0600 Subject: [PATCH 3/4] added esdocs notes in CONTRIBUTING and USAGE --- .github/USAGE.md | 13 +++++++++++++ .gitignore | 1 + CONTRIBUTING.md | 1 + 3 files changed, 15 insertions(+) diff --git a/.github/USAGE.md b/.github/USAGE.md index 70cbcfb0e..b4e5cb335 100644 --- a/.github/USAGE.md +++ b/.github/USAGE.md @@ -8,3 +8,16 @@ This USAGE.md contains information pertaining to all packages. For examples on h * [@sendgrid/inbound-mail-parser](https://github.com/sendgrid/sendgrid-nodejs/tree/master/packages/inbound-mail-parser) - help with parsing the SendGrid Inbound Parse API * [@sendgrid/contact-importer](https://github.com/sendgrid/sendgrid-nodejs/tree/master/packages/contact-importer) - help with importing contacts into the ContactDB * [@sendgrid/helpers](https://github.com/sendgrid/sendgrid-nodejs/tree/master/packages/helpers) - a collection of classes and helpers used internally by the above packages + + +# Documentation + +If you would like to auto-generate documentation of the packages, you can do so locally by running: +``` +./node_modules/.bin/esdoc +``` +Using the .esdoc.json file, esdoc will create documentation in the docs directory. + +## Checking docs coverage + +You will find a coverage.json file in the docs directory. This will contain information about the documentation coverage for each of the different files in this repo. \ No newline at end of file diff --git a/.gitignore b/.gitignore index cbdd97d02..b1baddc9b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ test/config.js *.log .vscode/ prism_darwin_amd64 +docs/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6028cc68a..90ed7cf94 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -131,6 +131,7 @@ Generally, we follow the style guidelines as suggested by the official language. Please run your code through: - [ESLint](http://eslint.org/) with the standard style guide. +- [esdoc](https://github.com/sendgrid/sendgrid-nodejs/blob/master/.github/USAGE.md) to check the documentation coverage of your added code. ## Creating a Pull Request From 6002c51d1956097df173c4e296559fe83cfbeb5d Mon Sep 17 00:00:00 2001 From: mbernier Date: Thu, 26 Oct 2017 21:50:44 -0600 Subject: [PATCH 4/4] moved USAGE to root dir --- .github/USAGE.md => USAGE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/USAGE.md => USAGE.md (100%) diff --git a/.github/USAGE.md b/USAGE.md similarity index 100% rename from .github/USAGE.md rename to USAGE.md