<commit_before>log4js = require('../log4js')
cluster = require 'cluster'
util = require 'util'
fs = require 'fs'
mkdirp = require 'mkdirp'
sysPath = require 'path'
_ = require 'lodash'
explore = require('fs-explorer').explore
semLib = require 'sem-lib'
anymatch = require 'anymatch'
logger = log4js.getLogger 'umd-builder'

initConfig = (options)->
    config = options._c = {}

    APPLICATION_PATH = sysPath.resolve options.paths.root
    CLIENT_RELATIVE_PATH = options.paths.watched[0]

    # Where to find client files
    CLIENT_PATH = sysPath.join APPLICATION_PATH, CLIENT_RELATIVE_PATH

    # where to find index.hbs
    CLIENT_ASSETS_PATH = sysPath.join CLIENT_PATH, 'assets'
    CLIENT_ASSETS_RELATIVE_PATH = sysPath.relative CLIENT_PATH, CLIENT_ASSETS_PATH

    BOWER_COMPONENTS_RELATIVE_PATH = 'bower_components'

    PUBLIC_PATH = sysPath.resolve APPLICATION_PATH, options.paths.public

    # where to copy non asset files
    CLIENT_MODULES_URL = 'node_modules'
    CLIENT_MODULES_PATH = sysPath.join PUBLIC_PATH, CLIENT_MODULES_URL

    # where to copy bower files
    BOWER_PUBLIC_PATH = sysPath.join PUBLIC_PATH, BOWER_COMPONENTS_RELATIVE_PATH

    # Bower relative path to be used by require.js for path resolution
    BOWER_COMPONENTS_URL = sysPath.relative(CLIENT_MODULES_PATH, BOWER_PUBLIC_PATH).replace /[\\]/g, '/'

    bowerConfig = require sysPath.resolve APPLICATION_PATH, 'bower.json'
    config.dependencies = bowerConfig.dependencies
    config.overrides = bowerConfig.overrides

    config.paths = {
        APPLICATION_PATH
        CLIENT_RELATIVE_PATH
        CLIENT_PATH
        CLIENT_ASSETS_PATH
        CLIENT_ASSETS_RELATIVE_PATH<commit_msg>backbone-validation to backbone.validation colorbox to jquery-colorbox fix overriding missing in builder<commit_after>log4js = require('../log4js')
cluster = require 'cluster'
util = require 'util'
fs = require 'fs'
mkdirp = require 'mkdirp'
sysPath = require 'path'
_ = require 'lodash'
explore = require('fs-explorer').explore
semLib = require 'sem-lib'
anymatch = require 'anymatch'
logger = log4js.getLogger 'umd-builder'

initConfig = (options)->
    config = options._c = {}

    APPLICATION_PATH = sysPath.resolve options.paths.root
    CLIENT_RELATIVE_PATH = options.paths.watched[0]

    # Where to find client files
    CLIENT_PATH = sysPath.join APPLICATION_PATH, CLIENT_RELATIVE_PATH

    # where to find index.hbs
    CLIENT_ASSETS_PATH = sysPath.join CLIENT_PATH, 'assets'
    CLIENT_ASSETS_RELATIVE_PATH = sysPath.relative CLIENT_PATH, CLIENT_ASSETS_PATH

    BOWER_COMPONENTS_RELATIVE_PATH = 'bower_components'

    PUBLIC_PATH = sysPath.resolve APPLICATION_PATH, options.paths.public

    # where to copy non asset files
    CLIENT_MODULES_URL = 'node_modules'
    CLIENT_MODULES_PATH = sysPath.join PUBLIC_PATH, CLIENT_MODULES_URL

    # where to copy bower files
    BOWER_PUBLIC_PATH = sysPath.join PUBLIC_PATH, BOWER_COMPONENTS_RELATIVE_PATH

    # Bower relative path to be used by require.js for path resolution
    BOWER_COMPONENTS_URL = sysPath.relative(CLIENT_MODULES_PATH, BOWER_PUBLIC_PATH).replace /[\\]/g, '/'

    bowerConfig = require sysPath.resolve APPLICATION_PATH, 'bower.json'
    config.dependencies = bowerConfig.dependencies
    config.overrides = bowerConfig.overrides || {}

    config.paths = {
        APPLICATION_PATH
        CLIENT_RELATIVE_PATH
        CLIENT_PATH
        CLIENT_ASSETS_PATH
        CLIENT_ASSETS_RELATIVE_PATH
{'fraction_non_alphanumeric': 0.07910750507099391, 'fraction_numerical': 0.0023181686467690526, 'mean_word_length': 4.136904761904762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3261583', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1125, 'n_words': 243}