MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/snap.cafsinfotech.in/node_modules/laravel-mix/src/tasks/ConcatenateFilesTask.js
let Task = require('./Task');
let FileCollection = require('../FileCollection');
const { FileGlob } = require('./FileGlob');

/** @typedef {import('../File')} File */

/**
 * @extends {Task<{ src: string|string[], output: File, babel: boolean, ignore?: string[] }>}
 */
class ConcatenateFilesTask extends Task {
    /**
     * Run the task.
     */
    run() {
        return this.merge();
    }

    /**
     * Merge the files into one.
     */
    async merge() {
        const files = await FileGlob.expand(this.data.src, {
            ignore: this.data.ignore || []
        });

        this.files = new FileCollection(files);

        return this.files
            .merge(this.data.output, this.data.babel)
            .then(this.assets.push.bind(this.assets));
    }

    /**
     * Handle when a relevant source file is changed.
     */
    onChange() {
        return this.merge();
    }
}

module.exports = ConcatenateFilesTask;