Skip to content

Commit

Permalink
add the path of current file to the list of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
WangZhekun committed May 28, 2016
1 parent 0033a37 commit c95baf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function plugin(options) {
var contents = file.contents.toString();

renames.forEach(function replaceOnce(rename) {
var unreved = options.modifyUnreved ? options.modifyUnreved(rename.unreved) : rename.unreved;
var reved = options.modifyReved ? options.modifyReved(rename.reved) : rename.reved;
var unreved = options.modifyUnreved ? options.modifyUnreved(rename.unreved, file.path) : rename.unreved;
var reved = options.modifyReved ? options.modifyReved(rename.reved, file.path) : rename.reved;
contents = contents.split(unreved).join(reved);
if (options.prefix) {
contents = contents.split('/' + options.prefix).join(options.prefix + '/');
Expand Down

0 comments on commit c95baf6

Please sign in to comment.