<commit_before>const path = require('path');
const gulp = require('gulp');
const coveralls = require('@kollavarsham/gulp-coveralls');
const eslint = require('gulp-eslint');
const excludeGitignore = require('gulp-exclude-gitignore');
const ts = require('gulp-typescript');
const del = require('del');
const ghPages = require('gulp-gh-pages');
const jsdoc = require('gulp-jsdoc3');

const tsProject = ts.createProject('tsconfig.main.json');
const tsDocsProject = ts.createProject('tsconfig.docs.json');

gulp.task('clean:dist', function (done) {
  del.sync(['dist/**']);
  done();
});

gulp.task('clean:doc', function (done) {
  del.sync(['doc/**']);
  del.sync(['es6/**']);
  done();
});

gulp.task('clean:jsii', function (done) {
  del.sync(['lib/**/*.js', 'lib/**/*.d.ts']);
  done();
});

gulp.task('static', function () {
  return gulp.src('**/*.ts')
    .pipe(excludeGitignore())
    .pipe(eslint())
    .pipe(eslint.format())
    .pipe(eslint.failAfterError());
});

gulp.task('watch', function () {
  gulp.watch(['lib/**/*.js', 'test/**'], ['test']);
});

gulp.task('coveralls', function (done) {
  if (!process.env.CI) {
    done();
  } else {
    return gulp.src(path.join(__dirname, 'coverage/lcov.info'))
      .pipe(coveralls());
  }
});

gulp.task('compile', function () {
  return tsProject.src()
    .pipe(tsProject())
    .pipe(gulp.dest('lib'));
});

gulp.task('compile:docs', function () {
  return tsDocsProject.src()
    .pipe(tsDocsProject())
    .pipe(gulp.dest('es6'));
});

gulp.task('prepublish', gulp.series('clean:dist', 'clean:jsii', 'static', 'compile'));

gulp.task('jsdoc', gulp.series('clean:doc', 'compile:docs', 'coveralls', function (done) {
  const config = require('./jsdoc.json');
  gulp.src(['README.md', './es6/**/*.js'], {read: false})
    .pipe(jsdoc(config, done));
}));

gulp.task('ghPages', function() {
  return gulp.src('./doc/**/*')
    .pipe(ghPages({
      remoteUrl: '<EMAIL>:kollavarsham/kollavarsham-js.git'
    }));
});

gulp.task('deployDoc', gulp.series('jsdoc', 'ghPages'));
<commit_msg>ensure '.circleci' folder is retained on gh-pages<commit_after>const path = require('path');
const gulp = require('gulp');
const coveralls = require('@kollavarsham/gulp-coveralls');
const eslint = require('gulp-eslint');
const excludeGitignore = require('gulp-exclude-gitignore');
const ts = require('gulp-typescript');
const del = require('del');
const ghPages = require('gulp-gh-pages');
const jsdoc = require('gulp-jsdoc3');

const tsProject = ts.createProject('tsconfig.main.json');
const tsDocsProject = ts.createProject('tsconfig.docs.json');

gulp.task('clean:dist', function (done) {
  del.sync(['dist/**']);
  done();
});

gulp.task('clean:doc', function (done) {
  del.sync(['doc/**']);
  del.sync(['es6/**']);
  done();
});

gulp.task('clean:jsii', function (done) {
  del.sync(['lib/**/*.js', 'lib/**/*.d.ts']);
  done();
});

gulp.task('static', function () {
  return gulp.src('**/*.ts')
    .pipe(excludeGitignore())
    .pipe(eslint())
    .pipe(eslint.format())
    .pipe(eslint.failAfterError());
});

gulp.task('watch', function () {
  gulp.watch(['lib/**/*.js', 'test/**'], ['test']);
});

gulp.task('coveralls', function (done) {
  if (!process.env.CI) {
    done();
  } else {
    return gulp.src(path.join(__dirname, 'coverage/lcov.info'))
      .pipe(coveralls());
  }
});

gulp.task('compile', function () {
  return tsProject.src()
    .pipe(tsProject())
    .pipe(gulp.dest('lib'));
});

gulp.task('compile:docs', function () {
  return tsDocsProject.src()
    .pipe(tsDocsProject())
    .pipe(gulp.dest('es6'));
});

gulp.task('prepublish', gulp.series('clean:dist', 'clean:jsii', 'static', 'compile'));

gulp.task('jsdoc', gulp.series('clean:doc', 'compile:docs', 'coveralls', function (done) {
  const config = require('./jsdoc.json');
  gulp.src(['README.md', './es6/**/*.js'], {read: false})
    .pipe(jsdoc(config, done));
}));

gulp.task('ghPages', function() {
  return gulp.src(['./doc/**/*', './.circleci/'])
    .pipe(ghPages({
      remoteUrl: '<EMAIL>:kollavarsham/kollavarsham-js.git'
    }));
});

gulp.task('deployDoc', gulp.series('jsdoc', 'ghPages'));

{'fraction_non_alphanumeric': 0.24758454106280192, 'fraction_numerical': 0.001932367149758454, 'mean_word_length': 4.626358695652174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7002537', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1500, 'n_words': 239}