Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could something like this work with vanilla JS? #4

Open
rchrdnsh opened this issue Oct 11, 2017 · 3 comments
Open

Could something like this work with vanilla JS? #4

rchrdnsh opened this issue Oct 11, 2017 · 3 comments
Assignees
Labels
help wanted Issues identified as good community contribution opportunities

Comments

@rchrdnsh
Copy link

Could a plugin like this work without lit-html and/or with any JS file that has a template literal in it?

@mjbvz
Copy link
Contributor

mjbvz commented Oct 11, 2017

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?

@mjbvz mjbvz self-assigned this Oct 11, 2017
@rchrdnsh
Copy link
Author

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 :-)

@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Oct 11, 2017
@wanton7
Copy link

wanton7 commented Dec 3, 2018

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`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

3 participants