grunt-coffeecup

Compile CoffeeCup into HTML.

grunt-coffeecup

Grunt task to compile CoffeeCup into HTML.

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-coffeecup --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of CoffeeScript:

grunt.loadNpmTasks 'grunt-coffeecup'

Run this task with the grunt coffeecup command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Any items in the options object are passed to CoffeeCup's render function.

grunt.initConfig
  # ... other configurations ... 
  coffeecup:
    simple:
      files:
        'path/to/result.html': 'path/to/source.coffee'
    recurse:
      expand: true
      cwd: 'path/to'
      src: ['**/*.coffee']
      dest: 'path/to/dest'
      ext: '.html'
    custom_title:
      options:
        title: 'Sweet Title, Bro'
      files:
        'path/to/custom/result.html': 'path/to/custom/source.coffee'

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.

  • 2013-03-18 v0.1.0 Bare minimum tests pass.