<commit_before>mainBowerFiles  = require 'main-bower-files'
concat          = require 'gulp-concat'
filter          = require 'gulp-filter'
commonjsWrap    = require 'gulp-wrap-commonjs'

pickFilesByExtension = (extension) -> filter (file) -> file.path.match new RegExp("." + extension + "$")

module.exports = (gulp) ->

  gulp.task 'build:bower', ->
    gulp.src mainBowerFiles()
    .pipe pickFilesByExtension 'js'
    .pipe commonjsWrap
      pathModifier: (filePath) ->
        matches = filePath.match /(bower_components|node_modules)\/(.*?)\//
        moduleName = matches[2]
        moduleName

    .pipe concat 'vendor.js'
    .pipe gulp.dest 'build/ui/scripts'

    gulp.src mainBowerFiles()
    .pipe pickFilesByExtension 'css'
    .pipe concat 'vendor.css'
    .pipe gulp.dest 'build/ui/styles'


  gulp.task 'build:copy:scripts', ->
    gulp.src 'node_modules/commonjs-require/commonjs-require.js'
      .pipe gulp.dest('build/ui/scripts')
    gulp.src 'bower_components/socket.io-client/socket.io.js'
      .pipe gulp.dest('build/ui/scripts')
<commit_msg>Copy eventric js into scripts folder<commit_after>mainBowerFiles  = require 'main-bower-files'
concat          = require 'gulp-concat'
filter          = require 'gulp-filter'
commonjsWrap    = require 'gulp-wrap-commonjs'

pickFilesByExtension = (extension) -> filter (file) -> file.path.match new RegExp("." + extension + "$")

module.exports = (gulp) ->

  gulp.task 'build:bower', ->
    gulp.src mainBowerFiles()
    .pipe pickFilesByExtension 'js'
    .pipe commonjsWrap
      pathModifier: (filePath) ->
        matches = filePath.match /(bower_components|node_modules)\/(.*?)\//
        moduleName = matches[2]
        moduleName

    .pipe concat 'vendor.js'
    .pipe gulp.dest 'build/ui/scripts'

    gulp.src mainBowerFiles()
    .pipe pickFilesByExtension 'css'
    .pipe concat 'vendor.css'
    .pipe gulp.dest 'build/ui/styles'


  gulp.task 'build:copy:scripts', ->
    gulp.src 'node_modules/eventric/build/dist/eventric.js'
      .pipe gulp.dest('build/ui/scripts')
    gulp.src 'node_modules/commonjs-require/commonjs-require.js'
      .pipe gulp.dest('build/ui/scripts')
    gulp.src 'bower_components/socket.io-client/socket.io.js'
      .pipe gulp.dest('build/ui/scripts')
{'fraction_non_alphanumeric': 0.14235190097259062, 'fraction_numerical': 0.0008841732979664014, 'mean_word_length': 3.033868092691622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7366386', 'n_tokens_mistral': 770, 'n_tokens_neox': 761, 'n_words': 141}