<commit_before>/// <reference path="typings/gulp/gulp.d.ts" />
/// <reference path="typings/gulp-typescript/gulp-typescript.d.ts" />

var gulp = require('gulp');
var concat = require('gulp-concat');
var tsc = require('gulp-typescript');
var handlebars = require('gulp-handlebars');
var wrap = require('gulp-wrap');
var declare = require('gulp-declare');
var path = require('path');

gulp.task('build', ['build:assets', 'build:typescript', 'build:vendor:js', 'build:templates']);

gulp.task('default', ['build']);

gulp.task('watch', ['build'], function() {
  gulp.watch('./assets/**/*.*', ['build:assets']);
  gulp.watch('./src/ts/**/*.ts', ['build:typescript']);
  return gulp.watch('./src/tpl/**/*.hbs', ['build:templates']);
});

gulp.task('build:assets', function() {
  return gulp.src('./assets/**/*.*').pipe(gulp.dest('./dest/'));
});

var tsProject = tsc.createProject('tsconfig.json', {out: "app.js"});
gulp.task('build:typescript', function() {
  var tsResult = gulp.src('./src/ts/**/*.ts')
    .pipe(tsc(tsProject));
  return tsResult.js.pipe(gulp.dest('./dest/js/'));
});

gulp.task('build:vendor:js', function() {
  return gulp.src(["./node_modules/jquery/dist/jquery.js", "./node_modules/handlebars/dist/handlebars.js"])
    .pipe(concat('vendors.js')).pipe(gulp.dest('./dest/js/'));
});

gulp.task('build:templates', function() {
  return gulp.src('./src/tpl/**/*.hbs')
    .pipe(handlebars())
    .pipe(wrap('Handlebars.template(<%= contents %>)'))
    .pipe(declare({
      namespace: 'Diccal.templates',
      noRedeclare: true,
      processName: function(filePath) {
        return declare.processNameByPath(filePath.replace('src' + path.sep + 'tpl' + path.sep, ''));<commit_msg>Add option at gulp-handlebars<commit_after>/// <reference path="typings/gulp/gulp.d.ts" />
/// <reference path="typings/gulp-typescript/gulp-typescript.d.ts" />

var gulp = require('gulp');
var concat = require('gulp-concat');
var tsc = require('gulp-typescript');
var handlebars = require('gulp-handlebars');
var wrap = require('gulp-wrap');
var declare = require('gulp-declare');
var path = require('path');

gulp.task('build', ['build:assets', 'build:typescript', 'build:vendor:js', 'build:templates']);

gulp.task('default', ['build']);

gulp.task('watch', ['build'], function() {
  gulp.watch('./assets/**/*.*', ['build:assets']);
  gulp.watch('./src/ts/**/*.ts', ['build:typescript']);
  return gulp.watch('./src/tpl/**/*.hbs', ['build:templates']);
});

gulp.task('build:assets', function() {
  return gulp.src('./assets/**/*.*').pipe(gulp.dest('./dest/'));
});

var tsProject = tsc.createProject('tsconfig.json', {out: "app.js"});
gulp.task('build:typescript', function() {
  var tsResult = gulp.src('./src/ts/**/*.ts')
    .pipe(tsc(tsProject));
  return tsResult.js.pipe(gulp.dest('./dest/js/'));
});

gulp.task('build:vendor:js', function() {
  return gulp.src(["./node_modules/jquery/dist/jquery.js", "./node_modules/handlebars/dist/handlebars.js"])
    .pipe(concat('vendors.js')).pipe(gulp.dest('./dest/js/'));
});

gulp.task('build:templates', function() {
  return gulp.src('./src/tpl/**/*.hbs')
    .pipe(handlebars({
      handlebars: require('handlebars')
    }))
    .pipe(wrap('Handlebars.template(<%= contents %>)'))
    .pipe(declare({
      namespace: 'Diccal.templates',
      noRedeclare: true,
      processName: function(filePath) {
        return declare.processNameByPath(filePath.replace('src' + path.sep + 'tpl' + path.sep, ''));
{'fraction_non_alphanumeric': 0.2486267707429893, 'fraction_numerical': 0.0, 'mean_word_length': 4.65359477124183, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3454055', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1206, 'n_words': 175}