src/generators/template/builder.js
function createBindingsTag(sourceNode, bindingsSelector) {
  if (!bindingsSelector) return sourceNode

  return {
    ...sourceNode,
    // inject the selector bindings into the node attributes
    attributes: [{
      name: bindingsSelector
    }, ...getNodeAttributes(sourceNode)]
  }
}
function createBindingsTag(sourceNode, bindingsSelector) {
  if (!bindingsSelector) return sourceNode

  return {
    ...sourceNode,
    // inject the selector bindings into the node attributes
    attributes: [{
      name: bindingsSelector
    }, ...getNodeAttributes(sourceNode)]
  }
}
function createBindingsTag ( sourceNode , bindingsSelector ) { if ( ! bindingsSelector ) return sourceNode return { ... sourceNode , // inject the selector bindings into the node attributes attributes : [ { name : bindingsSelector } , ... getNodeAttributes ( sourceNode ) ] } }
Nodes having bindings should be cloned and new selector properties should be added to them
@param   {RiotParser.Node} sourceNode - any kind of node parsed via riot parser
@param   {string} bindingsSelector - temporary string to identify the current node
@returns {RiotParser.Node} the original node parsed having the new binding selector attribute
Nodes having bindings should be cloned and new selector properties should be added to them