Skip to content
A simple template framework written in CoffeeScript. Intended to be small and simple, not featureful.
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
specs
AUTHORS
LICENSE
Makefile
README.md
mud.js
mud.litcoffee
package.json

README.md

cup-of-mud

A simple template framework written in pure CoffeeScript. Intended to be small and simple, not featureful.

Example

Mud = require 'cup-of-mud'

Mud -> [
    @raw '<!DOCTYPE html>'
    @html -> [
        @head ->
            @title 'Hello, world!'
        @body ->
            @p '''
                This is an example of the
                Cup of Mud template framework.
            '''
    ]
]

Output

<!DOCTYPE html>
<html>

    <head>

        <title>
            Hello, world!
        </title>

    </head>

    <body>

        <p>
            This is an example of the
            Cup of Mud template framework.
        </p>

    </body>

</html>

Available Functions

Every valid HTML5 tag should be usable within Cup of Mud, with the exception of DOCTYPE and comment tags. Tags that are defined as void by the spec will not print any body. All normal tags (tags that are not void) are closed XHTML style, i.e. <script></script> instead of <script><script>

Something went wrong with that request. Please try again.