 path = require 'path'
 exec = require('child_process').exec
 coffee = require 'coffee-script'
-styl = require 'stylus'
-# less = require 'less'
-nib = require 'nib'
-jade = require 'jade'
 jadeRuntime = fs.readFileSync(path.resolve __dirname, '../deps/jade.runtime.js').toString()
-hogan = require 'hogan'
 hoganPrefix = fs.readFileSync(path.resolve __dirname, '../deps/hogan.js').toString()
 sqwish = require 'sqwish'
 uglifyjs = require "uglify-js"

module.exports.templateParsers = templateParsers =
  
  '.jade': (contents, filename) ->
    jade.compile(contents, { client: true, compileDebug: true })

  '.mustache': (contents, filename) ->
    'new Hogan.Template(' + hogan.compile(contents, { asString: true }) + ')'

# Generates javascript template functions packed into a JST namespace
# 

      throw err
    
  '.styl': (contents, filename) ->
    require('stylus')(contents)
      .set('filename', process.cwd() + '/' + filename)
      .use(require('nib')())
      .render (err, out) ->
        throw(err) if err
        contents = out
