<commit_before>let Verify = require('./Verify');
let CopyFilesTask = require('./tasks/CopyFilesTask');
let ConcatFilesTask = require('./tasks/ConcatenateFilesTask');
let VersionFilesTask = require('./tasks/VersionFilesTask');
let webpack = require('webpack');
let glob = require('glob');
let _ = require('lodash');
let path = require('path');

class Api {
    /**
     * Register the Webpack entry/output paths.
     *
     * @param {string|Array} entry
     * @param {string} output
     */
    js(entry, output) {
        Verify.js(entry, output);

        entry = [].concat(entry).map(file => new File(file));
        output = new File(output);

        Config.js.push({ entry, output });

        return this;
    }

<commit_msg>Add glob support for mix.js() - closes #1419<commit_after>let Verify = require('./Verify');
let CopyFilesTask = require('./tasks/CopyFilesTask');
let ConcatFilesTask = require('./tasks/ConcatenateFilesTask');
let VersionFilesTask = require('./tasks/VersionFilesTask');
let webpack = require('webpack');
let glob = require('glob');
let _ = require('lodash');
let path = require('path');

class Api {
    /**
     * Register the Webpack entry/output paths.
     *
     * @param {string|Array} entry
     * @param {string} output
     */
    js(entry, output) {
        if (typeof entry === 'string' && entry.includes('*')) {
           entry = glob.sync(entry);
        }

        Verify.js(entry, output);

        entry = [].concat(entry).map(file => new File(file));
        output = new File(output);

        Config.js.push({ entry, output });

        return this;
    }


{'fraction_non_alphanumeric': 0.163455562461156, 'fraction_numerical': 0.002486016159105034, 'mean_word_length': 2.985148514851485, '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': '1713561', 'n_tokens_mistral': 476, 'n_tokens_neox': 470, 'n_words': 117}