Closed MattMcFarland closed 8 years ago
I think this line: https://github.com/trainyard/generator-choo/blob/master/app/templates/src/components/todo-list.js#L8 is the issue.
It is expecting the template string to be HTML but instead it is just an expression so it leaves it alone.
If each todo
is already an HTML element, you don't need to wrap it in a tagged template string. Just do this instead:
module.exports = (todos = [], send) => html`
<ul>
${
todos.map(item => todo(item, () => send('todoDemo:toggle', {id: item.id})))
}
</ul>
`
Wow that totally fixed it.. Thanks!!!
Man I almost think it might be nice to add a eslint plugin or something.. Or maybe have yo-yoify throw an error if it sees that?
Yep! I agree it would be cool if yo-yoify threw an error on things like that. I'll look into it.
The question marks there as this appears to be the issue as the source is not changing from using
html
The origin of the error occurs here: https://github.com/trainyard/generator-choo/issues/6
We were able to fix our build script by removing yo-yoify: https://github.com/trainyard/generator-choo/commit/4469ee91ee808f4856d8a407839bbb3c34d0d352