cp3

0.0.2 • Public • Published

cp3 Build Status Coverage Status

a comment parser 🌵

Intro

If comment:

/*
 * @module setting/profile - hero's basic info
 * @action getHero - get a hero's profile
 * @api {GET} /api/heroes/:id
 * @param {Int} id - hero's id
 */

After parsed:

{
  type: "project",
  body: [
    {
      type: "module",
      field: "setting/profile",
      description: "hero's basic info",
      body: [
        {
          type: "action",
          field: "getHero",
          description: "get a hero's profile",
          body: [
            {
              type: "api",
              datatype: "GET",
              field: "/api/heroes/:id"
            },
            {
              type: "param",
              datatype: "Int",
              field: "id",
              description: "hero's id"
            }
          ]
        }
      ]
    }
  ]
}

Development

# install
npm i

# start, and open http://localhost:10001/docs/index.html
npm start

# build for production
npm run build

Readme

Keywords

Package Sidebar

Install

npm i cp3

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • drakeleung