makdoc-coffeecup

Coffeecup plugin for makdoc

npm install makdoc-coffeecup
4 downloads in the last month

makdoc-coffeecup

coffeecup buff for makdoc

Getting Started

Install the module with: npm install makdoc-coffeecup

add package to package.json

{
  "devDependencies": {
    "makdoc-coffeecup": "latest"
  }
}

Now, Makdoc will load this buff and render '*.html.coffee' files to html.

Options

The following options can be specified in the Gruntfile.js.

common option

templateData

  • type : object
  • description : data that used in template.

In Gruntfile.coffee

makdoc:
  options:
    templateData:
        mydata:
          abc: "ABC"

Using in coffeecup template file

  div '.sample', -> "my data is #{@mydata.abc}"

helpers

  • type : function
  • description : It passed to coffeecup's 'local' option. you can use it for solving small problems.

In Gruntfile.coffee

makdoc:
  options:
    helpers:
      currentTime: () -> new Date

Using in coffeecup template file

  div '.sample', -> "Today is #{currentTime().toUTCString()}"

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2013+ Makdoc Licensed under the MIT license.

npm loves you