popeindustries / lit-html-server

Render lit-html templates on the server as Node.js streams
MIT License
265 stars 12 forks source link

Update docs to use {} for directives #98

Closed lukasoppermann closed 4 years ago

lukasoppermann commented 4 years ago

Hey @popeindustries, awesome project, thank you very much.

I just noticed that the examples from the docs don't work for me. If I use:

const repeat = require('@popeindustries/lit-html-server/directives/repeat.js');

I would actually have to use repeat.repeat() because it is exported as an object. To store the function from the js file to the const I need to import it as:

const { repeat } = require('@popeindustries/lit-html-server/directives/repeat.js');

If this is not just the case for me, it would be awesome to update the examples. Thanks.

popeindustries commented 4 years ago

Oops! Yeah, that's a typo. Thanks for spotting that!