Skip to content

Commit

Permalink
Actualize README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
artembatura authored May 22, 2021
1 parent 2ed564f commit 978121f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ module.exports = {

### `rules[].modify`

Type: `(source: string, filename: string) => string`
Type: `(source: string, path: string) => string`

`Required`

Function accept a source and filename. Should return a modified source.
Function accept a source and file path. Should return a modified source.

WARNING: modify function should make syntax compatible changes, for example all unsupported syntax will break your build or create errors in runtime.

Expand All @@ -113,9 +113,9 @@ module.exports = {
rules: [
{
test: /my-file\.js$/,
modify: (src, filename) =>
modify: (src, path) =>
src +
`\n\n// This file (${filename}) is written by me. All rights reserved`
`\n\n// This file (${path}) is written by me. All rights reserved`
}
]
})
Expand Down

0 comments on commit 978121f

Please sign in to comment.