-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
normalize copy plugin. Fixes #166 #167
base: master
Are you sure you want to change the base?
Conversation
function normalize(conf, list){ | ||
return conf == list[0] | ||
? conf.name | ||
: require('path').basename(conf.path()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks weird; why not just use basename
defined at L14?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why I did that. Removed L14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to not require()
inside a function, since it's sync ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yields shouldn't matter, as path
has been required multiple times areadly in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, i know require()
's are cached :) just looks weird IMHO haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah looks very weird i agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I’ve moved it.
--
Aaron Zhang
On March 10, 2014 at 3:28:49 PM, Stephen Mathieson ([email protected]) wrote:
In lib/plugins/copy.js:
@@ -62,3 +63,19 @@ module.exports = function(type, dest, opts){
batch.end(done);
};
};
+
+
+/**
—
Reply to this email directly or view it on GitHub.
moved require('path').basename outside of the function
No description provided.