<commit_before>var gulp = require('gulp');
var watch = require('gulp-watch');
var concat = require('gulp-concat');
var webpack = require('webpack');

var path = [
  'grid.js',
  'version.js',
  'detector.js',
  'formatinf.js',
  'errorlevel.js',
  'bitmat.js',
  'datablock.js',
  'bmparser.js',
  'datamask.js',
  'rsdecoder.js',
  'gf256poly.js',
  'gf256.js',
  'decoder.js',
  'qrcode.js',
  'findpat.js',
  'alignpat.js',
  'databr.js',
  'qrcode.node.js'
].map(function(p) {
  return 'src/' + p;
});

var compile = function() {
  return gulp.src(path)
    .pipe(concat('index.js'))
    .pipe(gulp.dest('dist'));
};

gulp.task('watch', function() {
  gulp.src(path)
  .pipe(watch(function(files) {
    compile();
  }));
});

gulp.task('compile', function() {
  return compile();
});

gulp.task('compile-browser', ['compile'], function(cb) {
  webpack({
    entry: './dist/index.js',
    output: {
      path: 'dist/',
      filename: 'browser.js'
    },
    plugins: [
      new webpack.optimize.UglifyJsPlugin()
    ]
  }, function(err, stats) {
    if (err) {
      console.log(err);
    }

    cb();
  });
});

gulp.task('default', ['watch']);<commit_msg>Add export to window in webpack build<commit_after>var gulp = require('gulp');
var watch = require('gulp-watch');
var concat = require('gulp-concat');
var webpack = require('webpack');

var path = [
  'grid.js',
  'version.js',
  'detector.js',
  'formatinf.js',
  'errorlevel.js',
  'bitmat.js',
  'datablock.js',
  'bmparser.js',
  'datamask.js',
  'rsdecoder.js',
  'gf256poly.js',
  'gf256.js',
  'decoder.js',
  'qrcode.js',
  'findpat.js',
  'alignpat.js',
  'databr.js',
  'qrcode.node.js'
].map(function(p) {
  return 'src/' + p;
});

var compile = function() {
  return gulp.src(path)
    .pipe(concat('index.js'))
    .pipe(gulp.dest('dist'));
};

gulp.task('watch', function() {
  gulp.src(path)
  .pipe(watch(function(files) {
    compile();
  }));
});

gulp.task('compile', function() {
  return compile();
});

gulp.task('compile-browser', ['compile'], function(cb) {
  webpack({
    entry: './dist/index.js',
    output: {
      path: 'dist/',
      library: 'QrCode',
      filename: 'browser.js'
    },
    plugins: [
      new webpack.optimize.UglifyJsPlugin()
    ]
  }, function(err, stats) {
    if (err) {
      console.log(err);
    }

    cb();
  });
});

gulp.task('default', ['watch']);
{'fraction_non_alphanumeric': 0.22231578947368422, 'fraction_numerical': 0.0050526315789473685, 'mean_word_length': 3.2053097345132744, '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': '4955332', 'n_tokens_mistral': 955, 'n_tokens_neox': 938, 'n_words': 155}