TrevorBurnham/snockets — Issue #11: Pass assetName argument to compileSync method
Author: umairsiddique
Created: 2012-01-29 18:09:41+00:00
State: open

So, instead of

```coffeescript
compileSync: (sourcePath, source) ->
```

We will have

```coffeescript
compileSync: (sourcePath, source, assetName) ->
```

This would be of particular use for adding compilers for template engines.

For example, I would be able to do this.

```coffeescript
assets.jsCompilers.mustache =
namespace: "TEMPLATES"
match: /\.js$/
compileSync: (sourcePath, source, assetName) ->
compiled = hogan.compile(source, asString: true)
"(function() { window.#{@namespace} = window.#{@namespace} || {}; window.#{@namespace}['#{assetName}'] = #{compiled}; })();"
```