Skip to content

Commit 60e1ee5

Browse files
committed
feat(jsdoc2md): add jsdoc2md support, and README template
1 parent 89c6c5a commit 60e1ee5

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

etc/README.hbs

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Kerberos
2+
========
3+
[![Build Status](https://travis-ci.org/mongodb-js/kerberos.svg?branch=master)](https://travis-ci.org/mongodb-js/kerberos)
4+
5+
The `kerberos` package is a C++ extension for Node.js that provides cross-platform support for kerberos authentication using GSSAPI on linux/osx, and SSPI on windows. Much of the code in this module is adapted from [ccs-kerberos](https://github.com/apple/ccs-pykerberos) and [winkerberos](https://github.com/mongodb-labs/winkerberos).
6+
7+
### Requirements
8+
9+
**Linux**
10+
- `python` v2.7
11+
- `make`
12+
- A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org/)
13+
- Distribution-specific kerberos packages (e.g. `krb5-dev` on Ubuntu)
14+
15+
**macOS**
16+
- `Xcode Command Line Tools`: Can be installed with `xcode-select --install`
17+
- Distribution-specific kerberos packages (e.g. `krb5` on Homebrew)
18+
19+
**Windows**
20+
- **Option 1:** Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) by running `npm install -g windows-build-tools` from an elevated PowerShell (run as Administrator).
21+
- **Option 2:** Install dependencies and configuration manually
22+
1. Visual C++ Build Environment:
23+
* **Option 1:** Install [Visual C++ Build Tools](http://go.microsoft.com/fwlink/?LinkId=691126) using the *Default Install* option.
24+
* **Option 2:** Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup.
25+
26+
> :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
27+
28+
2. Install [Python 2.7](https://www.python.org/downloads/) or [Miniconda 2.7](http://conda.pydata.org/miniconda.html) (`v3.x.x` is not supported), and run `npm config set python python2.7`
29+
3. Launch cmd, `npm config set msvs_version 2015`
30+
31+
### Installation
32+
33+
Now you can install `kerberos` with the following:
34+
35+
```bash
36+
npm install kerberos
37+
```
38+
39+
### Testing
40+
41+
Run the test suite using:
42+
43+
```bash
44+
npm test
45+
```
46+
47+
NOTE: The test suite requires an active kerberos deployment, see `test/scripts/travis.sh` to better understand these requirements.
48+
49+
# Documentation
50+
51+
{{>main}}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
"chai": "^4.1.2",
2121
"chai-string": "^1.4.0",
2222
"clang-format": "^1.2.3",
23+
"dmd-clear": "^0.1.2",
2324
"eslint": "^4.19.1",
2425
"eslint-plugin-prettier": "^2.6.0",
26+
"jsdoc-to-markdown": "^4.0.1",
2527
"mocha": "^5.2.0",
2628
"mongodb": "^3.1.1",
2729
"prettier": "^1.13.5",
@@ -34,7 +36,8 @@
3436
"format-js": "prettier --print-width 100 --tab-width 2 --single-quote --write index.js 'test/**/*.js' 'lib/**/*.js'",
3537
"lint": "eslint index.js lib test",
3638
"precommit": "check-clang-format",
37-
"test": "mocha ./test"
39+
"test": "mocha ./test",
40+
"docs": "jsdoc2md --template etc/README.hbs --plugin dmd-clear --files lib/kerberos.js > README.md"
3841
},
3942
"author": "Christian Amor Kvalheim",
4043
"license": "Apache-2.0",

0 commit comments

Comments
 (0)