diff --git a/.esdoc.json b/.esdoc.json new file mode 100644 index 0000000..1cd4b6e --- /dev/null +++ b/.esdoc.json @@ -0,0 +1,13 @@ +{ + "source": "./lib", + "destination": "./docs", + "plugins": [ + { + "name": "esdoc-coverage-plugin", + "option": { + "enable": true, + "kind": ["class", "method", "member", "get", "set", "constructor", "function", "variable"] + } + } + ] + } diff --git a/.gitignore b/.gitignore index 0e68d82..205a372 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ .DS_Store npm-debug.log +docs .env \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6a19705..3112dff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,6 @@ node_js: - "6" - "7" - "8" -- "node" -- "lts/*" notifications: hipchat: rooms: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3526f5..8a359cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -137,6 +137,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/smtpapi-nodejs/blob/master/.github/USAGE.md) to check the documentation coverage of your added code. ## Creating a Pull Request diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..e2e5f07 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,11 @@ +# 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. diff --git a/package.json b/package.json index 7d00edd..9cca12e 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,10 @@ "author": "scottmotte", "license": "BSD", "dependencies": { + "chai": "^2.3.0", + "esdoc": "^1.0.3", + "esdoc-coverage-plugin": "^1.1.0", + "esdoc-type-inference-plugin": "^1.0.1" }, "devDependencies": { "mocha": "3.5.3",