node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »


CoffeeScript DSL View Engine Build Status

Want to make an awesome view engine in CoffeeScript? Try this:

cdsl = require "coffee-dsl"
myDSL = cdsl.dsl()
myDSL.set "root"(fun)->
    hello: (value)->
      "Hello #{value}"
module.exports = myDSL
@root ->
  @hello "World"
myDSL = require "my-dsl"
myDSL.renderFile ""(error, result)->
  console.log result

This will render Hello World.

The real power comes when we want to build complex objects in a simple way. Look at cscj for an example.


npm install -d
npm test