diff --git a/.gitignore b/.gitignore index 87661d5e..861f8b58 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ coverage build/Release dist/ +# Autogenerated docs output +/docs/api + node_modules/* Factorio* diff --git a/docs/jsdoc.json b/docs/jsdoc.json new file mode 100644 index 00000000..88b1ded8 --- /dev/null +++ b/docs/jsdoc.json @@ -0,0 +1,23 @@ +{ + "plugins": [ + "plugins/markdown" + ], + "tags": { + "allowUnknownTags": false + }, + "opts": { + "destination": "docs/api", + "recurse": true + }, + "source": { + "include": [ + "master.js", + "slave.js", + "clusterctl.js", + "lib/", + "plugins/", + "routes/", + "routes.js" + ] + } +} diff --git a/package.json b/package.json index 81468226..8646ff7b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "cover": "nyc npm test", "fast-cover": "FAST_TEST=y nyc npm test", "ci-cover": "nyc --reporter=lcovonly npm run-script test", + "docs": "jsdoc --configure docs/jsdoc.json", "install": "node lib/npmPostinstall", "bundle-dependencies": "bundle-dependencies" }, @@ -67,6 +68,7 @@ }, "devDependencies": { "html5-validator": "^1.2.1", + "jsdoc": "^3.6.3", "klaw": "^3.0.0", "mocha": "^6.2.0", "mocha-sinon": "^2.1.0",