<commit_before>/* eslint arrow-body-style: 0 */

import gulp from 'gulp';

import _ from 'lodash';
import babel from 'gulp-babel';
import clean from 'gulp-clean';
import concat from 'gulp-concat';
import cssmin from 'gulp-cssmin';
import { createWindowsInstaller as electronInstaller } from 'electron-winstaller';
import less from 'gulp-less';
import packager from 'electron-packager';
import rebuild from './vendor/rebuild';
import replace from 'gulp-replace';
import runSequence from 'run-sequence';

import { spawn, exec } from 'child_process';

const paths = {
  internalScripts: ['src/**/*.js'],
  externalScripts: ['node_modules/gmusic.js/dist/gmusic.min.js',
                    'node_modules/gmusic-ui.js/dist/gmusic-ui.min.js',
                    'node_modules/gmusic-theme.js/dist/gmusic-theme.min.js',
                    'node_modules/gmusic-mini-player.js/dist/gmusic-mini-player.min.js'],
  utilityScripts: ['node_modules/jquery/dist/jquery.min.js',
                    'node_modules/materialize-css/dist/js/materialize.min.js',
                    'node_modules/materialize-css/extras/noUiSlider/nouislider.min.js'],
  html: 'src/public_html/**/*.html',
  less: 'src/assets/less/**/*.less',
  fonts: ['node_modules/materialize-css/dist/font/**/*',
          '!node_modules/materialize-css/dist/font/material-design-icons/*',
          'node_modules/material-design-icons-iconfont/dist/fonts/**/*'],
  images: ['src/assets/icons/**/*', 'src/assets/img/**/*'],
  locales: ['src/_locales/*.json'],
};

const packageJSON = require('./package.json');
let version = packageJSON.dependencies['electron-prebuilt'];
if (version.substr(0, 1) !== '0' && version.substr(0, 1) !== '1') {
  version = version.substr(1);
}

const defaultPackageConf = {
  'app-bundle-id': packageJSON.name,
  'app-category-type': 'public.app-category.music',
  'app-copyright': `Copyright © ${(new Date()).getFullYear()} ${packageJSON.author.name}, All rights reserved.`, // eslint-disable-line
  'app-version': packageJSON.version,
  arch: 'all',
  'build-version': packageJSON.version,
  dir: '.',
  icon: './build/assets/img/main',
  ignore: (path) => {
    const tests = [
      // Ignore git directory
      () => /^\/\.git\/.*/g,
      // Ignore electron-prebuilt
      () => /^\/node_modules\/electron-prebuilt\//g,
      // Ignore debug files
      () => /^\/node_modules\/.*\.pdb/g,
      // Ignore native module obj files
      () => /^\/node_modules\/.*\.obj/g,
      // Ignore root dev FileDescription
      () => /^\/(vendor|dist|sig|docs|src|test|.cert.pfx|.editorconfig|.eslintignore|.eslintrc|.gitignore|.travis.yml|appveyor.yml|circle.yml|CONTRIBUTING.md|Gruntfile.js|gulpfile.js|ISSUE_TEMPLATE.md|LICENSE|README.md)(\/|$)/g, // eslint-disable-line
    ];
    for (let i = 0; i < tests.length; i++) {
      if (tests[i]().test(path)) {
        return true;
      }
    }
    return false;<commit_msg>Ignore symlinks in the node_modules bin directory<commit_after>/* eslint arrow-body-style: 0 */

import gulp from 'gulp';

import _ from 'lodash';
import babel from 'gulp-babel';
import clean from 'gulp-clean';
import concat from 'gulp-concat';
import cssmin from 'gulp-cssmin';
import { createWindowsInstaller as electronInstaller } from 'electron-winstaller';
import less from 'gulp-less';
import packager from 'electron-packager';
import rebuild from './vendor/rebuild';
import replace from 'gulp-replace';
import runSequence from 'run-sequence';

import { spawn, exec } from 'child_process';

const paths = {
  internalScripts: ['src/**/*.js'],
  externalScripts: ['node_modules/gmusic.js/dist/gmusic.min.js',
                    'node_modules/gmusic-ui.js/dist/gmusic-ui.min.js',
                    'node_modules/gmusic-theme.js/dist/gmusic-theme.min.js',
                    'node_modules/gmusic-mini-player.js/dist/gmusic-mini-player.min.js'],
  utilityScripts: ['node_modules/jquery/dist/jquery.min.js',
                    'node_modules/materialize-css/dist/js/materialize.min.js',
                    'node_modules/materialize-css/extras/noUiSlider/nouislider.min.js'],
  html: 'src/public_html/**/*.html',
  less: 'src/assets/less/**/*.less',
  fonts: ['node_modules/materialize-css/dist/font/**/*',
          '!node_modules/materialize-css/dist/font/material-design-icons/*',
          'node_modules/material-design-icons-iconfont/dist/fonts/**/*'],
  images: ['src/assets/icons/**/*', 'src/assets/img/**/*'],
  locales: ['src/_locales/*.json'],
};

const packageJSON = require('./package.json');
let version = packageJSON.dependencies['electron-prebuilt'];
if (version.substr(0, 1) !== '0' && version.substr(0, 1) !== '1') {
  version = version.substr(1);
}

const defaultPackageConf = {
  'app-bundle-id': packageJSON.name,
  'app-category-type': 'public.app-category.music',
  'app-copyright': `Copyright © ${(new Date()).getFullYear()} ${packageJSON.author.name}, All rights reserved.`, // eslint-disable-line
  'app-version': packageJSON.version,
  arch: 'all',
  'build-version': packageJSON.version,
  dir: '.',
  icon: './build/assets/img/main',
  ignore: (path) => {
    const tests = [
      // Ignore git directory
      () => /^\/\.git\/.*/g,
      // Ignore electron-prebuilt
      () => /^\/node_modules\/electron-prebuilt\//g,
      // Ignore debug files
      () => /^\/node_modules\/.*\.pdb/g,
      // Ignore native module obj files
      () => /^\/node_modules\/.*\.obj/g,
      // Ignore symlinks in the bin directory
      () => /^\/node_modules\/.bin/g,
      // Ignore root dev FileDescription
      () => /^\/(vendor|dist|sig|docs|src|test|.cert.pfx|.editorconfig|.eslintignore|.eslintrc|.gitignore|.travis.yml|appveyor.yml|circle.yml|CONTRIBUTING.md|Gruntfile.js|gulpfile.js|ISSUE_TEMPLATE.md|LICENSE|README.md)(\/|$)/g, // eslint-disable-line
    ];
    for (let i = 0; i < tests.length; i++) {
      if (tests[i]().test(path)) {
        return true;
      }
    }
    return false;
{'fraction_non_alphanumeric': 0.1872678149273894, 'fraction_numerical': 0.00303951367781155, 'mean_word_length': 3.153576437587658, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '2800857', 'n_tokens_mistral': 2061, 'n_tokens_neox': 1991, 'n_words': 340}