New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apidoc-light

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apidoc-light - npm Package Compare versions

Comparing version 0.51.1 to 0.52.0

44

package.json
{
"name": "apidoc-light",
"version": "0.51.1",
"version": "0.52.0",
"description": "RESTful web API Documentation Generator",

@@ -21,2 +21,8 @@ "author": {

},
"scripts": {
"eslint": "./node_modules/.bin/eslint --ext js,mjs lib",
"pre-commit": "npm run eslint && npm run test",
"serve": "npm run build-example && docker run --rm --name apidoc -p 8080:80 -v /tmp/apidoc-output:/usr/share/nginx/html:ro -d nginx",
"test": "mocha --colors --no-package --no-config 'test/**/*_test.*js'"
},
"keywords": [

@@ -41,30 +47,24 @@ "api",

"dependencies": {
"fs-extra": "^10.0.1",
"glob": "^7.2.0",
"fs-extra": "^10.1.0",
"glob": "^8.0.3",
"iconv-lite": "^0.6.3",
"klaw-sync": "^6.0.0",
"lodash": "^4.17.21",
"markdown-it": "^12.3.2",
"semver": "^7.3.5",
"winston": "^3.6.0"
"markdown-it": "^13.0.1",
"semver": "^7.3.7",
"winston": "^3.8.1"
},
"devDependencies": {
"@types/lodash": "^4.14.180",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.21",
"eslint": "^8.11.0",
"@types/lodash": "^4.14.182",
"@types/mocha": "^9.1.1",
"@types/node": "^18.6.1",
"eslint": "^8.20.0",
"eslint-config-recommended": "^4.1.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.2.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"mocha": "^9.2.2"
},
"scripts": {
"eslint": "./node_modules/.bin/eslint --ext js,mjs lib",
"pre-commit": "npm run eslint && npm run test",
"serve": "npm run build-example && docker run --rm --name apidoc -p 8080:80 -v /tmp/apidoc-output:/usr/share/nginx/html:ro -d nginx",
"test": "mocha --colors --no-package --no-config 'test/**/*_test.*js'"
},
"readme": "# apidoc-light\n\nFork of apiDoc with a way-lighter bundle optimized for programmatic usage.\n\nit's used in [apidoc-markdown](https://github.com/rigwild/apidoc-markdown).\n\n**Warning:** This is only meant to be used with programmatic usage. Documentation generation will not work!\n\nFeatures:\n\n* As minimal as possible code changes to easily keep in sync with new future apidoc updates\n* Removed unnecessary CLI\n* Removed unnecessary documentation templates\n* Removed unnecessary dependencies\n - `bootstrap`\n - `commander`\n - `diff-match-patch`\n - `expose-loader`\n - `handlebars`\n - `jquery`\n - `nodemon`\n - `path-to-regexp`\n - `prismjs`\n - `url-parse`\n - `webpack`\n - `webpack-cli`\n - `style-loader`\n* Removed console log on `uncaughtException`\n* Removed file Writer\n* Outputs objects instead of JSON strings\n* Bubble up the errors to the lib consumer\n* `dryRun` options set to `true` by default\n* Annoying `warn: Provided \"src\" option is not an array. Converting it to array.` now logged to debug log mode only\n* Minimal typings integrated directly\n* Removed tests relevant to documentation generation\n\n## Usage\n\n```sh\npnpm install apidoc-light\n```\n\n```ts\nimport { createDoc } from 'apidoc-light'\n\nconst doc: Doc = createDoc({ src: input })\n\n// Output\ntype Doc = {\n project: Record<string, any> // apiDoc project object (`apidoc.json`)\n data: Array<Record<string, any>>: // apiDoc documentation object (`api_data.json` file content)\n}\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2013-2021 inveris OHG\nCopyright (c) 2021 rigwild <me@rigwild.dev> (https://github.com/rigwild)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n---\n\n# apiDoc\n\napiDoc creates a documentation from API descriptions in your source code.\n\n![validate](https://github.com/apidoc/apidoc/workflows/validate/badge.svg)\n[![Dependency Status](https://david-dm.org/apidoc/apidoc.svg)](https://david-dm.org/apidoc/apidoc)\n[![NPM version](https://badge.fury.io/js/apidoc.svg)](http://badge.fury.io/js/apidoc)\n[![Join the chat at https://gitter.im/apidoc/talk](https://badges.gitter.im/apidoc/talk.svg)](https://gitter.im/apidoc/talk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n### Documentation: [apidocjs.com](http://apidocjs.com)\n\n### [Live DEMO](http://apidocjs.com/example/)\n\n## Installation\n\n```bash\n$ npm install -g apidoc\n```\n\n## Usage\n\nAdd some apidoc comments anywhere in your source code:\n\n```java\n/**\n * @api {get} /user/:id Request User information\n * @apiName GetUser\n * @apiGroup User\n *\n * @apiParam {Number} id User's unique ID.\n *\n * @apiSuccess {String} firstname Firstname of the User.\n * @apiSuccess {String} lastname Lastname of the User.\n */\n```\n\nNow generate the documentation from `src/` into `doc/`.\n\n```bash\n$ apidoc -i src/ -o doc/\n```\n\nThis repository contains and `example` folder from which you can generate a very complete documentation on an example api endpoint. It also contains best practice hints (in the `footer.md` file).\n\n```bash\n$ git clone https://github.com/apidoc/apidoc && cd apidoc\n$ npm install --prod\n$ ./bin/apidoc -i example -o /tmp/doc\n$ $BROWSER /tmp/doc\n```\n\n### Programmatic usage\n\nYou can generate the documentation programmatically:\n\n```ts\nimport path from 'path'\nimport { createDoc } from 'apidoc'\n\nconst doc = createDoc({\n src: path.resolve(__dirname, 'src'),\n dest: path.resolve(__dirname, 'doc'), // can be omitted if dryRun is true\n // if you don't want to generate the output files:\n dryRun: true,\n // if you don't want to see any log output:\n silent: true,\n})\n\nif (typeof doc !== 'boolean') {\n // Documentation was generated!\n console.log(doc.data) // the parsed api documentation object\n console.log(doc.project) // the project information\n}\n```\n\nInstall type definitions (see [@types/apidoc](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/apidoc/index.d.ts)):\n\n```bash\n$ npm install -D @types/apidoc\n```\n\n## Docker image\n\nYou can use apidoc in Docker like this:\n\n~~~bash\n# first build the image after cloning this repository\ndocker build -t apidoc/apidoc .\n# run it\ndocker run --rm -v $(pwd):/home/node/apidoc apidoc/apidoc -o outputdir -i inputdir\n~~~\n\n## Supported programming languages\n\n * **C#, Go, Dart, Java, JavaScript, PHP, Scala** (all DocStyle capable languages):\n\n ```javascript\n /**\n * This is a comment.\n */\n ```\n\n * **Clojure**:\n\n ```clojure\n ;;;;\n ;; This is a comment.\n ;;;;\n ```\n\n * **CoffeeScript**:\n\n ```coffeescript\n ###\n This is a comment.\n ###\n ```\n\n * **Elixir**:\n\n ```elixir\n #{\n # This is a comment.\n #}\n ```\n\n * **Erlang**:\n\n ```erlang\n %{\n % This is a comment.\n %}\n ```\n\n * **Perl**\n\n ```perl\n #**\n # This is a comment.\n #*\n ```\n\n ```perl\n =pod\n This is a comment.\n =cut\n ```\n\n * **Python**\n\n ```python\n \"\"\"\n This is a comment.\n \"\"\"\n ```\n\n * **Ruby**\n\n ```ruby\n =begin\n This is a comment.\n =end\n ```\n\n## Plugins (extend apiDoc)\n\napiDoc will auto include installed plugins.\n\n * [apidoc-plugin-schema](https://github.com/willfarrell/apidoc-plugin-schema) Generates and inject apidoc elements from api schemas. `npm install apidoc-plugin-schema`\n\nFor details and an example on how to implement your own plugin, please view [apidoc-plugin-test](https://github.com/apidoc/apidoc-plugin-test).\n\n## Support\n\nPlease [create a new issue](https://github.com/apidoc/apidoc/issues/new/choose) if you have a suggestion/question or if you found a problem/bug.\n\n## Contributing\n\napiDoc is a collaborative project. Pull requests are welcome. Please see the [CONTRIBUTING](https://github.com/apidoc/apidoc/blob/master/CONTRIBUTING.md) file.\n\n## Build tools\n\n* [flask-apidoc](https://pypi.python.org/pypi/flask-apidoc/) `pip install flask-apidoc`\n* [grunt-apidoc](https://github.com/apidoc/grunt-apidoc) `npm install grunt-apidoc`.\n* [gapidoc (gulp)](https://github.com/techgaun/gulp-apidoc) `npm install gapidoc`.\n* [webpack-apidoc](https://github.com/c0b41/webpack-apidoc) `npm install --save-dev webpack-apidoc`.\n\n## Integration\n\n* [Eclipse Java apiDoc editor templates](https://github.com/skhani/eclipse_java_apiDoc_templates)\n* [Eclipse plugin](https://github.com/DWand/eclipse_pdt_apiDoc_editor_templates)\n* [Microsoft WebAPI](https://github.com/chehabz/grunt-edge-apidoc-webapi-generator)\n* [Sublime Text plugin](https://github.com/DWand/ST3_apiDocAutocompletion)\n\n## Converter\n\n* [apidoc-swagger](https://github.com/fsbahman/apidoc-swagger)\n* [apidoc-swagger-3](https://github.com/amanoooo/apidoc-swagger-3)\n* [gulp-apidoc-swagger](https://github.com/fsbahman/gulp-apidoc-swagger)\n* [Docmaster](https://github.com/bonzzy/docmaster)\n* [apidoc-markdown](https://github.com/rigwild/apidoc-markdown)\n"
}
"mocha": "^10.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc