for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\Assets\Pipes\Presets\Npm;
use Arcanedev\Assets\Helpers\Stub;
use Closure;
use Illuminate\Support\Facades\File;
/**
* Class CopyPresetDirectories
*
* @package Arcanedev\Assets\Pipes\Presets\Npm
* @author ARCANEDEV <[email protected]>
*/
class CopyPresetDirectories
{
/* -----------------------------------------------------------------
| Main Method
| -----------------------------------------------------------------
* @param array $passable
* @param \Closure $next
* @return mixed
public function handle(array $passable, Closure $next)
foreach ($this->getStubs($passable) as $from => $to) {
File::copyDirectory($from, $to);
}
return $next($passable);
| Other Methods
* Get the stubs directories.
* @return array
protected function getStubs(array $passable)
return [
Stub::path('presets/npm/src') => base_path($passable['path'].'/src'),
];