@vanillawc/wc-template

1.0.25 • Public • Published

<wc-template> Tagged Template Literals in HTML

GitHub Releases NPM Releases Bundlephobia Latest Status Release Status

Discord Published on WebComponents.org

Installation

Installation

npm i @vanillawc/wc-template

Import from NPM

<script type="module" src="node_modules/@vanillawc/wc-template/index.js"></script>

Import from CDN

<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-template@1/index.js"></script>

Demo

Try it on WebComponents.dev

Usage

Attributes

  • src - load an external source file
  • context - load the tags from an external endpoint

Basic Usage

<wc-template src="sample.html"></wc-template>

Context

If the template is a tagged template literal, context can be provided via an external endpoint.

<wc-template src="sample2.html" theme="context.json"></wc-template>

Contributing

See CONTRIBUTING.md

Package Sidebar

Install

npm i @vanillawc/wc-template

Weekly Downloads

4

Version

1.0.25

License

MIT

Unpacked Size

11 kB

Total Files

10

Last publish

Collaborators

  • evanplaice