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 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 diff --git a/.github/USAGE.md b/USAGE.md similarity index 73% rename from .github/USAGE.md rename to USAGE.md index 70cbcfb0e..b4e5cb335 100644 --- a/.github/USAGE.md +++ b/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/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" }