Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevlened committed Jan 24, 2016
1 parent f8ed94d commit 8b14cfa
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ A pattern looks like:
- is required
- can be an absolute or path relative to the context
- can be a file or directory
- can be a glob
* `to`
- is optional
- is relative to the build root (webpack defaults to `dist`)
- defaults to `'/'`
- if not absolute, it's relative to the build root
- must be a directory if `from` is a directory
* `toType`
- is optional
Expand Down Expand Up @@ -54,19 +54,22 @@ module.exports = {
plugins: [
new CopyWebpackPlugin([
// {output}/file.txt
{ from: 'path/to/file.txt' },
{ from: 'from/file.txt' },

// {output}/path/to/build/file.txt
{ from: 'path/to/file.txt', to: 'path/to/build/file.txt' },
// {output}/to/file.txt
{ from: 'from/file.txt', to: 'to/file.txt' },

// {output}/path/to/build/directory/file.txt
{ from: 'path/to/file.txt', to: 'path/to/build/directory' },
// {output}/to/directory/file.txt
{ from: 'from/file.txt', to: 'to/directory' },

// Copy directory contents to {output}/
{ from: 'path/to/directory' },
{ from: 'from/directory' },

// Copy directory contents to {output}/path/to/build/directory/
{ from: 'path/to/directory', to: 'path/to/build/directory' },
// Copy directory contents to {output}/to/directory/
{ from: 'from/directory', to: 'to/directory' },

// Copy glob results to /absolute/path/
{ from: 'from/directory/**/*', to: '/absolute/path' },

// {output}/file/without/extension
{
Expand Down

0 comments on commit 8b14cfa

Please sign in to comment.