Skip to content

Instantly share code, notes, and snippets.

@sixlettervariables
Created November 6, 2014 03:28
Show Gist options
  • Save sixlettervariables/55bb677e3c2cd2fca047 to your computer and use it in GitHub Desktop.
Save sixlettervariables/55bb677e3c2cd2fca047 to your computer and use it in GitHub Desktop.
Example Adaro/Dustjs additional helpers configuration
"view engines": {
"js": {
"module": "engine-munger",
"renderer": {
"method": "js",
"arguments": [
{
"cache": true,
"helpers": [
{
"name": "dustjs-helpers",
"arguments": []
},
{
"name": "./lib/helpers/cdn",
"arguments": [
{
"cdn": "cdn$.xyz.com",
"arity": 4
}
]
}
]
},
{
"views": "config:express.views",
"view engine": "config:express.view engine",
"specialization": "config:specialization",
"i18n": "config:i18n"
}
]
}
}
},
@jasisk
Copy link

jasisk commented Nov 6, 2014

Worth noting, perhaps, that anything that doesn't take arguments (other than the implicit dust) such as ...

{ 
  "name": "dustjs-helpers",
  "arguments": []
}

... can be replaced with ...

"dustjs-helpers"

... if you don't mind the mix of objects and strings in your helpers array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment