Skip to content

Commit

Permalink
minor #443 Improve copyFiles method examples #2 (kapiwko, weaverryan)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

Improve `copyFiles` method examples #2

Like in #442 Fix also `to` option in examples - paths are relative to build dir, not root dir.

Commits
-------

4b2ceda clarifying comment
676afcb Improve `copyFiles` method examples #2
  • Loading branch information
weaverryan committed Nov 10, 2018
2 parents 2b623f7 + 4b2ceda commit bbf687b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,14 @@ class Encore {
* Encore.copyFiles({
* from: './assets/images',
* pattern: /\.(png|jpg|jpeg)$/,
* to: 'assets/images/[path][name].[ext]'
* // to path is relative to the build directory
* to: 'images/[path][name].[ext]'
* })
*
* // Version files
* Encore.copyFiles({
* from: './assets/images',
* to: 'assets/images/[path][name].[hash:8].[ext]'
* to: 'images/[path][name].[hash:8].[ext]'
* })
*
* // Add multiple configs in a single call
Expand Down

0 comments on commit bbf687b

Please sign in to comment.