<commit_before>const gulp = require('gulp');
const minifyHtml = require('gulp-minify-html');
const angularTemplatecache = require('gulp-angular-templatecache');
<% if (modules !== 'inject') { -%>
const insert = require('gulp-insert');
<% } -%>

const conf = require('../conf/gulp.conf');

gulp.task('partials', partials);

function partials() {
  return gulp.src(conf.path.src('app/**/*.html'))
    .pipe(minifyHtml({
      empty: true,
      spare: true,
      quotes: true
    }))
    .pipe(angularTemplatecache('templateCacheHtml.<%- js === 'typescript' ? 'ts' : 'js' %>', {
      module: conf.ngModule,
<% if (modules !== 'systemjs') { -%>
      root: 'app'
<% } else { -%>
      root: 'src/app'
<% } -%>
    }))
<% if (modules !== 'inject') { -%>
<%   if (js === 'typescript') { -%>
    .pipe(insert.prepend(`import * as angular from 'angular';`))
<%   } else if (js === 'babel') { -%>
    .pipe(insert.prepend(`import angular from 'angular';`))
<%   } else { -%>
    .pipe(insert.prepend(`var angular = require('angular');`))
<%   } -%><commit_msg>template cache is in js when using inject<commit_after>const gulp = require('gulp');
const minifyHtml = require('gulp-minify-html');
const angularTemplatecache = require('gulp-angular-templatecache');
<% if (modules !== 'inject') { -%>
const insert = require('gulp-insert');
<% } -%>

const conf = require('../conf/gulp.conf');

gulp.task('partials', partials);

function partials() {
  return gulp.src(conf.path.src('app/**/*.html'))
    .pipe(minifyHtml({
      empty: true,
      spare: true,
      quotes: true
    }))
<% if (js === 'typescript' && modules !== 'inject') { -%>
    .pipe(angularTemplatecache('templateCacheHtml.ts', {
<% } else { -%>
    .pipe(angularTemplatecache('templateCacheHtml.js', {
<% } -%>
      module: conf.ngModule,
<% if (modules !== 'systemjs') { -%>
      root: 'app'
<% } else { -%>
      root: 'src/app'
<% } -%>
    }))
<% if (modules !== 'inject') { -%>
<%   if (js === 'typescript') { -%>
    .pipe(insert.prepend(`import * as angular from 'angular';`))
<%   } else if (js === 'babel') { -%>
    .pipe(insert.prepend(`import angular from 'angular';`))
<%   } else { -%>
    .pipe(insert.prepend(`var angular = require('angular');`))
<%   } -%>
{'fraction_non_alphanumeric': 0.23637176050044684, 'fraction_numerical': 0.0, 'mean_word_length': 3.451292246520875, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '970579', 'n_tokens_mistral': 806, 'n_tokens_neox': 779, 'n_words': 148}