tasks/build.js
function injectTemplate(forModule) {
  return (
    gulp
      .src(
        forModule
          ? `./${config.temp.path}/${config.element.tag}.js`
          : `./${config.temp.path}/${config.element.tag}.script.js`
      )

      // Inject the template html.
      .pipe(
        inject(gulp.src(`./${config.temp.path}/${config.src.template.html}`), {
          starttag: '[[inject:template]]',
          endtag: '[[endinject]]',
          removeTags: true,
          transform: util.transforms.getFileContents
        })
      )

      // Inject the style css.
      .pipe(
        inject(gulp.src(`./${config.temp.path}/${config.src.template.css}`), {
          starttag: '[[inject:style]]',
          endtag: '[[endinject]]',
          removeTags: true,
          transform: util.transforms.getFileContents
        })
      )
      .pipe(gulp.dest(`./${config.temp.path}`))
  );
}
function injectTemplate(forModule) {
  return (
    gulp
      .src(
        forModule
          ? `./${config.temp.path}/${config.element.tag}.js`
          : `./${config.temp.path}/${config.element.tag}.script.js`
      )

      // Inject the template html.
      .pipe(
        inject(gulp.src(`./${config.temp.path}/${config.src.template.html}`), {
          starttag: '[[inject:template]]',
          endtag: '[[endinject]]',
          removeTags: true,
          transform: util.transforms.getFileContents
        })
      )

      // Inject the style css.
      .pipe(
        inject(gulp.src(`./${config.temp.path}/${config.src.template.css}`), {
          starttag: '[[inject:style]]',
          endtag: '[[endinject]]',
          removeTags: true,
          transform: util.transforms.getFileContents
        })
      )
      .pipe(gulp.dest(`./${config.temp.path}`))
  );
}
function injectTemplate ( forModule ) { return ( gulp . src ( forModule ? ` ${ config . temp . path } ${ config . element . tag } ` : ` ${ config . temp . path } ${ config . element . tag } ` ) // Inject the template html. . pipe ( inject ( gulp . src ( ` ${ config . temp . path } ${ config . src . template . html } ` ) , { starttag : '[[inject:template]]' , endtag : '[[endinject]]' , removeTags : true , transform : util . transforms . getFileContents } ) ) // Inject the style css. . pipe ( inject ( gulp . src ( ` ${ config . temp . path } ${ config . src . template . css } ` ) , { starttag : '[[inject:style]]' , endtag : '[[endinject]]' , removeTags : true , transform : util . transforms . getFileContents } ) ) . pipe ( gulp . dest ( ` ${ config . temp . path } ` ) ) ) ; }
Inject the template into the element.

@param {boolean} forModule
States whether or not the injection is for the module.
If not, it is assumed to be for the script.
@returns {NodeJS.ReadWriteStream}
Inject the template into the element .