<commit_before>'use strict';

var path = require('path');
var gulp = require('gulp');
var runSequence = require('run-sequence');
var vinylSourceStream = require('vinyl-source-stream');
var vinylPaths = require('vinyl-paths');
var del = require('del');
var browserify = require('browserify');
var babelify = require('babelify');

var paths = {
  output: path.join(__dirname, 'dist'),
  system: [path.join(__dirname, 'main.js')],
  systemOutput: path.join(__dirname, 'main.js'),
  html: path.join(__dirname, 'index.html')
};
var babelOptions = {
  global: true,
  ignore: /node_modules\/(?!rotorjs)/,
  presets: ['es2015', 'stage-1'],
  plugins: [
    ['transform-react-jsx', {pragma: 'h'}],
    ['transform-runtime']
  ],
  compact: false
};

gulp.task('clean', function() {
  return gulp.src([paths.output])
    .pipe(vinylPaths(del));
});

gulp.task('build-system', function () {
  return browserify(paths.system)
    .transform(babelify, babelOptions)
    .bundle()
    .pipe(vinylSourceStream(paths.systemOutput))
    .pipe(gulp.dest(paths.output));
});

gulp.task('build-html', function () {
  return gulp.src(paths.html)
    .pipe(gulp.dest(paths.output));
});

gulp.task('build', function (callback) {
  return runSequence(
    'clean',
    ['build-system', 'build-html'],
    callback
  );
});<commit_msg>Example: Add source maps generation<commit_after>'use strict';

var path = require('path');
var gulp = require('gulp');
var runSequence = require('run-sequence');
var vinylSourceStream = require('vinyl-source-stream');
var vinylPaths = require('vinyl-paths');
var del = require('del');
var browserify = require('browserify');
var babelify = require('babelify');

var paths = {
  output: path.join(__dirname, 'dist'),
  system: [path.join(__dirname, 'main.js')],
  systemOutput: path.join(__dirname, 'main.js'),
  html: path.join(__dirname, 'index.html')
};
var babelOptions = {
  global: true,
  ignore: /node_modules\/(?!rotorjs)/,
  presets: ['es2015', 'stage-1'],
  plugins: [
    ['transform-react-jsx', {pragma: 'h'}],
    ['transform-runtime']
  ],
  compact: false
};
var browserifyOptions = {
  debug: true
};

gulp.task('clean', function() {
  return gulp.src([paths.output])
    .pipe(vinylPaths(del));
});

gulp.task('build-system', function () {
  return browserify(paths.system, browserifyOptions)
    .transform(babelify, babelOptions)
    .bundle()
    .pipe(vinylSourceStream(paths.systemOutput))
    .pipe(gulp.dest(paths.output));
});

gulp.task('build-html', function () {
  return gulp.src(paths.html)
    .pipe(gulp.dest(paths.output));
});

gulp.task('build', function (callback) {
  return runSequence(
    'clean',
    ['build-system', 'build-html'],
    callback
  );
});
{'fraction_non_alphanumeric': 0.19239290989660265, 'fraction_numerical': 0.003692762186115214, 'mean_word_length': 4.632016632016632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5679545', 'n_tokens_mistral': 926, 'n_tokens_neox': 903, 'n_words': 177}