Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Latest commit

 

History

History
63 lines (46 loc) · 1.17 KB

README.md

File metadata and controls

63 lines (46 loc) · 1.17 KB

laravel-elixir-apidoc

Build API document by apiDoc

Install

$ npm install laravel-elixir-apidoc --save-dev

Usage

Create the apidoc.json in root path:

{
  "name": "example",
  "version": "0.1.0",
  "description": "apiDoc basic example",
  "title": "Custom apiDoc browser title",
  "url" : "https://api.github.com/v1"
}

Add document block in php file, for example:

/**
 * @api {get} / Welcome Page
 * @apiName WelcomePage
 * @apiGroup Home
 * @apiVersion 0.1.0
 * @apiDescription Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eu arcu scelerisque, mattis sapien sed, dapibus risus. Integer finibus diam sit amet semper imperdiet. Vivamus venenatis elit vitae venenatis dictum. Vivamus ac turpis at purus placerat iaculis et ut purus.
 *
 */

Then add the apidoc extension in your gulpfile.js:

var elixir = require('laravel-elixir');
require('laravel-elixir-apidoc');

elixir(function(mix) {
  mix.apidoc();
});

Finally run gulp tasks:

gulp

Or rebuild apidoc only:

gulp apidoc

License

MIT