Open rchrdnsh opened 7 years ago
Yes. By default the plugin is active in any template tagged with html
but you can configure which tags are used: https://github.com/Microsoft/typescript-lit-html-plugin#tags
Can you provide some examples of other possible template strings you'd like this plugin to support?
I have been starting to learn how to build vanilla web components, and I have also been starting to use template literals in JS arrays and objects to create and store fully dynamic content. Since I am writing my content inside template literals inside a JS object it becomes quite painful when there is no autocompletion or syntax highlighting, which slows me down and leads to typos in my code and content as well. AS far as WC's, there is at least some form of syntax highlighting in Atom, but alas, not autocompletion, so the issues affect me there as well. These are my current use cases, but as I explore template literals more and more I'm sure that more use cases will arise :-)
Any change to have this work without tagging a string with html
? Maybe using a comment front of the literal string? Something like var foo = /* lit-html */ `literal string`;
Could a plugin like this work without lit-html and/or with any JS file that has a template literal in it?