node_modules/laravel-mix/src/tasks/CopyFilesTask.js
/**
     * Handle when a relevant source file is changed.
     *
     * @param {string} updatedFile
     */
Handle when a relevant source file is changed.
@param {string} updatedFile
Handle when a relevant source file is changed . @param { string } updatedFile
onChange(updatedFile) {
        let destination = this.data.to;
        if (! Array.isArray(this.data.from) && new File(this.data.from).isDirectory()) {
            destination = destination.append(path.normalize(updatedFile).replace(path.normalize(this.data.from), ''));
        }
        console.log(`Copying ${updatedFile} to ${destination.path()}`);
        this.files.copyTo(destination, new File(updatedFile));
    }
onChange ( updatedFile ) { let destination = this . data . to ; if ( ! Array . isArray ( this . data . from ) && new File ( this . data . from ) . isDirectory ( ) ) { destination = destination . append ( path . normalize ( updatedFile ) . replace ( path . normalize ( this . data . from ) , '' ) ) ; } console . log ( ` ${ updatedFile } ${ destination . path ( ) } ` ) ; this . files . copyTo ( destination , new File ( updatedFile ) ) ; }
Handle when a relevant source file is changed.
Handle when a relevant source file is changed .
// If we're copying a src directory recursively, we have to calculate // the correct destination path, based on the src directory tree.