Skip to content

Commit

Permalink
Add note about mix.copy() flattening.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Jan 25, 2017
1 parent 6de265d commit 206c14a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/copying-files.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copying Files

```js
mix.copy(from, to);
mix.copy(from, to, flatten = true);
```

From time to time, you'll want to copy one or more files, as part of your build process. No problem; that's a cinch. Use the mix.copy\(\) method to specify the source file or folder, and then your desired destination.
Expand All @@ -12,3 +12,4 @@ mix.copy('node_modules/vendor/acme.txt', 'public/js/acme.txt');

Upon compilation, the "acme" directory will be moved to `public/js/acme.txt`, accordingly. A common use case for this is when you wish to move a set of fonts, installed through NPM, to your public directory.

> Note: By default, the output path will be flattened. As such, all files will be copied to the same directory. You may disable this as the third argument, should you need Laravel Mix to honor your existing directory tree.

0 comments on commit 206c14a

Please sign in to comment.