Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bumble-docs

littlebee27MIT0.9.4

API and examples documentation generator that probably won't work with your code :)

docs, coffeescript, cjsx

readme

bumble-docs

API and examples documentation generator that probably won't work with your code :)

This is the api documentation and examples generator I built (with help from lots of other packages - thank you!). It is used to generate the static github.io docs for react-datum and, coming soon, react-tilegrid.

I didn't want to wholesale copy the code for the docs generation between projects / repos that were split out from react-datum.

This seriously, probably will not work for you. If you are writing in coffeescript and cjsx, have examples in cjsx or jsx it may work for you, but no gurantees. Fork you! I mean me, Fork me!

package.json

Some of the configurable variables of the generated docs, come from the package.json file.

Standard package.json attributes used:

name: The name of the package is used as the page title.

description: is displayed in the header upper right the documentation generation

homepage: is used as the href in the "View on Github" link

bumbleDocs.js

Create a file named bumbleDocs.js or .coffee in your project root that module.exports the following attributes:

  module.exports = 

    # Expects a project root relative image path that is the src for the image displayed 
    # in the upper left header.  
    logo: "img/docs/tilegrid.logo.png"

    # these get added to the css linked to the static examples and docs and copied to 
    # docs/css
    styleSheets: [{
      path: "css/docs/tilegridExample.css"
      media: "screen"
    }]

    # these will get added as script tags into the generated pages 
    scripts: [{
      path: "test/lib/kittenData.js"
      # can also include the type (defaults to text/javascript)
      # type: "someSillyScriptLanguage"
    },{
      path: "dist/tilegrid.js"
    }]


    apiDocs: {
      # in the generated API docs, you can have sections. documentation found in the 
      # sources returned by the path glob will be in the section with a header
      # and sections are rendered in the order below
      sections: [{
        label: "Tilegrid" 
        # this can be any glob supported by https://github.com/isaacs/node-glob
        path: "src/tilegrid/**/*"
      }]
    }

    examples: {
      # a base path for all examples (defaults to '$project_root/examples')
      root: 'examples'
      demos: [{
        # should be unique (gets used as a backbone id)
        id: "bigKittens"
        name: "Big Kittens Demo!"
        # path joined to examples.root 
        path: "tilegrid.jsx"
        # this can be as long as you need and include HTML
        description: "This demo shows off the variable height and width capabilities of the tiles.  ...with kittens!"
      }]    
    }

Each examples gets its own html wrapper that enables it to be run statically and standalone for easy debugging.

An example viewer app that has a list left, demo and code on the right layout is also created in docs/examples/index.html.

changelog

0.9.4 - (2018-06-18)

Bugs Fixed in this Release

  • 85ba3ae parser stops parsing PropTypes prematurely

0.9.3 (2018-04-23)

Other Commits

  • 38563f5 found the real culprit in the ES2015 vs es2015 preset issue

0.9.2 (2018-04-22)

Other Commits

0.9.1 (2018-04-16)

Other Commits

  • 913a673 upgrade markd package to 0.9.3 to appease github nanny bot

0.9.0 (2018-04-16)

Other Commits

  • 7ecf9ed use package.json 'homepage' attribute for view on Github link

0.8.2 (2018-04-14)

Other Commits

  • 897484f remove extra inclusion of underscore and tilegrid.min.js in examples

0.8.1 (2018-04-11)

Other Commits

  • ab39b79 prefer to get our doc vendor libs from using app's node_modules

0.8.0 (2018-04-11)

Support for React versions < 16.0 has been deprecated. Please use version 0.7.x for React 14 support.

Other Commits

  • abcb2ed bumble docs works on react 16

0.7.0 (2018-04-5)

Breaking change: you will need to copy your own vendor libs into your docs/vendor directory at build time.

Other Commits

  • 1b3b49e stop shipping static vendor libs with source

0.6.1 (2018-04-5)

Other Commits

  • df361de add babel-plugin-transform-class-properties when building ES6 examples

0.6.0 (2018-04-5)

Other Commits

  • 34609b1 Doc generation works on React 16

0.5.5 (2018-04-4)

Other Commits

  • fac49d0 upgrade babel presets to latest

0.5.4 (2018-04-4)

Other Commits

  • df801a9 update coffee-react to 5.0.1 to support react 16

0.5.3 (2017-02-20)

Other Commits

  • a3b35bb add support for ignoring coffee-coverage pragma comments

0.5.2 (2017-02-18)

Other Commits

  • 953e6ad limit docs gen to coffee and cjsx files

0.5.1 (2016-11-327)

Bugs Fixed in this Release

  • 431d1f8 method matcher should tolerate lack of () in function definition and ignore blank lines

0.5.0 (2016-11-326)

Other Commits

  • 20aa65a always show propTypes and default props in docs and toc

0.4.6 (2016-04-109)

Bugs Fixed in this Release

  • 23c7dc6 add guard against mismatch in docContent links generator

Other Commits

  • 495d658 add a sample bumbleDocs.coffee file

0.4.5 (2016-03-66)

Other Commits

  • 0421c37 skip all docs generation unless ./bumbleDocs.(js|coffee) exists in user app root

0.4.4 (2016-02-54)

Other Commits

  • c55db07 make docs gen work for tilegrid dependency loop.