sourcejs / sourcejs-react-docgen

react-docgen integration plugin, renders React components information into SourceJS Spec page.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using <spec path>/index.jsx doesn't work

mik01aj opened this issue · comments

It's a bug in this line:

var componentPathToUse = componentPath ? componentPath : componentPathAlt;

CC @operatino

Thanks for the report, I'll check it out. Was doing thus plugin in a rush for a demo.

Even after moving the file, the plugin still doesn't work:

image

This is the docgen output for my component:

{
  "description": "",
  "displayName": "Avatar",
  "props": {
    "user": {
      "type": {
        "name": "shape",
        "value": {
          "name": {
            "name": "string",
            "required": true
          }
        }
      },
      "required": false,
      "description": ""
    },
    "size": {
      "type": {
        "name": "number"
      },
      "required": false,
      "description": ""
    },
    "withTooltip": {
      "type": {
        "name": "bool"
      },
      "required": false,
      "description": ""
    },
    "style": {
      "type": {
        "name": "object"
      },
      "required": false,
      "description": ""
    }
  }
}

Fixed in 0.2.0