Skip to content

Instantly share code, notes, and snippets.

@peduarte
Last active March 30, 2016 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peduarte/a7069163f5cad3c8d39c to your computer and use it in GitHub Desktop.
Save peduarte/a7069163f5cad3c8d39c to your computer and use it in GitHub Desktop.
/**
* Function to render a ui component
* @param params - any available parameters allowed
* @param params.name
* @return {partial}
*/
dust.helpers.uiComponent = function (chunk, context, bodies, params) {
var name = context.resolve(params.name);
return chunk.partial('components/' + name + '/' + name, context, params);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment