npm list --depth=0)node -v): 6.2.2npm -v): 4.2.0Running the command mix.copy('source_dir/*/*.file_type','destination_dir/',flatten) copies the dir structure from the root of where the command is executed. This was not the case before with elixir/gulp.
Eg. Running the following command produces
mix.copy('resources/src/**/*.html','public/app',false);
public/app/resources/src/login/login.html
I was expecting the the folder structure to be
public/app/login/login.html
npm run dev
Can you try doing mix.copyDirectory(from, to) instead?
The command does not work as intended. Its copying the entire directory structure from where you executed the command.
mix.copyDirectory('resources/src/**/*.html','public/app'); or mix.copy('resources/src/**/*.html','public/app',false);
Produces this
resources/src/login/login.html -> public/app/resources/src/login/login.html
I'm not sure why you didnt gave me a chance to respond before closing the issue.
That's because you didn't provide a path to a directory as the first argument. You passed a regular expression to a file type.
I must say thanks for responding. Just tested it without the regex by passing only the the folder name mix.copy('resources/src','public/app',false); and that copied the structure properly. Wait. There is a major issue still. I don't want to copy the other stuff inside of this folder thats why I was trying to only get .html files. Is there any other way of doing this. Elixir was doing this fine before and you are partially doing it just that its copying entire folder structure.