<commit_before>/**
 * Gruntfile for dorabella, a freedom.js-powered encrypted chat app
 **/

var path = require('path');
var pgpPath = path.dirname(require.resolve('freedom-pgp-e2e/package.json'));
var freedomPath = path.dirname(require.resolve('freedom'));
var providersPath = path.dirname(require.resolve('radiatus-providers'));
var hexPath = path.dirname(require.resolve('hex2words'));
var tabPath = path.dirname(require.resolve('tab-strip'));

module.exports = function(grunt) {
  grunt.initConfig({
    copy: {
      app: {
        cwd: 'src/',
        src: ['**/**'],
        dest: 'build/',
        expand: true
      },
      freedom: {
        src: [freedomPath + '/dist/freedom.min.js*'],
        dest: 'build/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      radiatusWsServer: {
        src: [providersPath + '/src/providers/social.radiatus.js*'],
        dest: 'build/websocket-server/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      freedomPgpE2e: {
        cwd: pgpPath + '/dist/',
        src: ['*.js', 'pgpapi.json'],
        dest: 'build/freedom-pgp-e2e/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      tabStrip: {
        cwd: tabPath,
        src: ['TabStrip.js'],
        dest: 'build/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      dist: {
	      cwd: 'build/',
	      src: ['**/**'],
	      dest: 'dist/',
	      expand: true
      }
    },

    browserify: {
      hex2words: {
        files: {
          'build/hex2words.js': [require.resolve('hex2words')]
        },
        options: {
          browserifyOptions: {
            standalone: 'hex2words'
          }
        }
      }
    },

    jshint: {
      all: ['src/*.js', 'spec/*.js', 'spec/integration/*.js'],
      options: {
        jshintrc: true
      }
    },

    connect: {
      demo: {
        options: {
          port: 8000,
          keepalive: true,
          base: ['./', 'build/'],
          open: 'http://localhost:8000/build/'
        }
      }
    },

    buildcontrol: {
      options: {
	      dir: 'dist/',
	      commit: true,
	      push: true,
	      message: 'Built %sourceName% from commit %sourceCommit% on branch ' +
	        '%sourceBranch%'
      },
      pages: {
	      options: {
          remote: 'https://github.com/soycode/dorabella.git',
          branch: 'gh-pages'
	      }
      }
    },

    clean: ['build/']
  });

  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-build-control');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-copy');<commit_msg>switch tabs to spaces<commit_after>/**
 * Gruntfile for dorabella, a freedom.js-powered encrypted chat app
 **/

var path = require('path');
var pgpPath = path.dirname(require.resolve('freedom-pgp-e2e/package.json'));
var freedomPath = path.dirname(require.resolve('freedom'));
var providersPath = path.dirname(require.resolve('radiatus-providers'));
var hexPath = path.dirname(require.resolve('hex2words'));
var tabPath = path.dirname(require.resolve('tab-strip'));

module.exports = function(grunt) {
  grunt.initConfig({
    copy: {
      app: {
        cwd: 'src/',
        src: ['**/**'],
        dest: 'build/',
        expand: true
      },
      freedom: {
        src: [freedomPath + '/dist/freedom.min.js*'],
        dest: 'build/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      radiatusWsServer: {
        src: [providersPath + '/src/providers/social.radiatus.js*'],
        dest: 'build/websocket-server/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      freedomPgpE2e: {
        cwd: pgpPath + '/dist/',
        src: ['*.js', 'pgpapi.json'],
        dest: 'build/freedom-pgp-e2e/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      tabStrip: {
        cwd: tabPath,
        src: ['TabStrip.js'],
        dest: 'build/',
        flatten: true,
        filter: 'isFile',
        expand: true
      },
      dist: {
        cwd: 'build/',
        src: ['**/**'],
        dest: 'dist/',
        expand: true
      }
    },

    browserify: {
      hex2words: {
        files: {
          'build/hex2words.js': [require.resolve('hex2words')]
        },
        options: {
          browserifyOptions: {
            standalone: 'hex2words'
          }
        }
      }
    },

    jshint: {
      all: ['src/*.js', 'spec/*.js', 'spec/integration/*.js'],
      options: {
        jshintrc: true
      }
    },

    connect: {
      demo: {
        options: {
          port: 8000,
          keepalive: true,
          base: ['./', 'build/'],
          open: 'http://localhost:8000/build/'
        }
      }
    },

    buildcontrol: {
      options: {
        dir: 'dist/',
        commit: true,
        push: true,
        message: 'Built %sourceName% from commit %sourceCommit% on branch ' +
          '%sourceBranch%'
      },
      pages: {
        options: {
          remote: 'https://github.com/soycode/dorabella.git',
          branch: 'gh-pages'
        }
      }
    },

    clean: ['build/']
  });

  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-build-control');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-copy');
{'fraction_non_alphanumeric': 0.16602809706257982, 'fraction_numerical': 0.0058383506659368724, 'mean_word_length': 1.8360062079668908, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3652421', 'n_tokens_mistral': 1840, 'n_tokens_neox': 1805, 'n_words': 316}