src/generators/template/bindings/tag.js
function buildSlot(id, sourceNode, sourceFile, sourceCode) {
  const cloneNode = {
    ...sourceNode,
    // avoid to render the slot attribute
    attributes: getNodeAttributes(sourceNode).filter(attribute => attribute.name !== SLOT_ATTRIBUTE)
  }
  const [html, bindings] = build(cloneNode, sourceFile, sourceCode)

  return builders.objectExpression([
    simplePropertyNode(BINDING_ID_KEY, builders.literal(id)),
    simplePropertyNode(BINDING_HTML_KEY, builders.literal(html)),
    simplePropertyNode(BINDING_BINDINGS_KEY, builders.arrayExpression(bindings))
  ])
}
function buildSlot(id, sourceNode, sourceFile, sourceCode) {
  const cloneNode = {
    ...sourceNode,
    // avoid to render the slot attribute
    attributes: getNodeAttributes(sourceNode).filter(attribute => attribute.name !== SLOT_ATTRIBUTE)
  }
  const [html, bindings] = build(cloneNode, sourceFile, sourceCode)

  return builders.objectExpression([
    simplePropertyNode(BINDING_ID_KEY, builders.literal(id)),
    simplePropertyNode(BINDING_HTML_KEY, builders.literal(html)),
    simplePropertyNode(BINDING_BINDINGS_KEY, builders.arrayExpression(bindings))
  ])
}
function buildSlot ( id , sourceNode , sourceFile , sourceCode ) { const cloneNode = { ... sourceNode , // avoid to render the slot attribute attributes : getNodeAttributes ( sourceNode ) . filter ( attribute => attribute . name !== SLOT_ATTRIBUTE ) } const [ html , bindings ] = build ( cloneNode , sourceFile , sourceCode ) return builders . objectExpression ( [ simplePropertyNode ( BINDING_ID_KEY , builders . literal ( id ) ) , simplePropertyNode ( BINDING_HTML_KEY , builders . literal ( html ) ) , simplePropertyNode ( BINDING_BINDINGS_KEY , builders . arrayExpression ( bindings ) ) ] ) }
Create the slot entity to pass to the riot-dom bindings
@param   {string} id - slot id
@param   {RiotParser.Node.Tag} sourceNode - slot root node
@param   {stiring} sourceFile - source file path
@param   {string} sourceCode - original source
@returns {AST.Node} ast node containing the slot object properties
Create the slot entity to pass to the riot - dom bindings