gulp-inject-html-template
Inject html template into innerHTML
Install
$ npm install --save-dev gulp-inject-html-template
Usage
File to inject template in
Add the // @template comment to your element, the comment will be replaced by the template's content
{ super; // @template }
Template to inject
hello world
Usage in gulpfile
const gulp = ;const injectTemplate = ; // Inject html template into custom-element// inject-template searches in the same directory for a matching template.html file// in this case some-element.htmlgulp
TODO
- Add all inject-template options
- Support template id's (<template id="some-element">)
- Add documentation for the new templatePath option
License
MIT © Glenn Vandeuren