Wondering what’s next for npm?Check out our public roadmap! »

    monstra
    TypeScript icon, indicating that this package has built-in type declarations

    0.9.1 • Public • Published

    Orbit-monstra is a simple docs generator from ts declaration files for @kiwicom/orbit-components project

    Available commands:

    • docs: creates README.md files in component folder with table of props, subcomponents and description example: monstra docs --path='src/*/'

    How to document component:

    • To create basic description add to index.d.ts next comment block: /* DOCS: <your description> */

      example:

      /* DOCS:
      
      # AirportIllustration
      
      To implement AirportIllustration component into your project you'll need to add the import:
      
      import AirportIllustration from "@kiwicom/orbit-components/lib/AirportIllustration";
      
      After adding import into your project you can use it simply like:
      
      <AirportIllustration name="Accommodation" size="small" />
      
      */
      

      Note: (same with /* FunctionalSpec: */)


    • When you run docs command it creates table with Name and Type like:

      Name Type Optional Description
      size [enum](#enum)
      name Name

      in order to add description and default value, you have to add comment lines in index.d.ts file of component in JSDoc format:

      export interface Props extends Globals, SpaceAfter {
        /** The size of the AirportIllustration */
        /** default: "small" */
        readonly size?: "extraSmall" | "small" | "medium" | "large" | "display";
        readonly name: Name;
        readonly alt?: string;
      }

    Install

    npm i monstra

    DownloadsWeekly Downloads

    133

    Version

    0.9.1

    License

    MIT

    Unpacked Size

    38.1 kB

    Total Files

    35

    Last publish

    Collaborators

    • avatar