Inject html template into innerHTML
npm install gulp-inject-html-template> Inject html template into innerHTML
```
$ npm install --save-dev gulp-inject-html-template
js
class SomeElement extends HTMLElement {
constructor() {
super();
// @template
}
}
`$3
`html
hello world
`$3
`js
const gulp = require('gulp');
const injectTemplate = require('gulp-inject-html-template');// Inject html template into custom-element
// inject-template searches in the same directory for a matching template.html file
// in this case some-element.html
gulp.task('default', () => {
gulp.src('src/some-element.js')
.pipe(injectTemplate())
.pipe(gulp.dest('dist'))
);
``MIT © Glenn Vandeuren