Skip to content
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

Pass arguments to tmp #8

Merged
merged 4 commits into from
Oct 14, 2016
Merged

Pass arguments to tmp #8

merged 4 commits into from
Oct 14, 2016

Conversation

piranna
Copy link
Contributor

@piranna piranna commented Oct 11, 2016

No description provided.

return module.exports.file.apply(tmp).then(function context(o) {

var params = Array.prototype.slice.call(arguments);
params.shift();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this should be shift? Also, I'm wondering if it's not enough to do Array.from rather than Array.slice.call here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.shift() remove the first entry from the array, in this case the fn. We can use instead .slice(1) if it's cleaner, and now that I think about it, we are already using .slice(), hum...

Yes, we could use Array.from(), it's just that I always forgot about it, I'm too much used to the .slice() hack :-P

@@ -0,0 +1,53 @@
const accessSync = require('fs').accessSync
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using const here means we can't run the tests on older node. a nitpick but I deliberately avoided ES2015 features to keep old node uspport.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enought, I'll change it. Are you planning to use Travis for the tests or something? I could be able to configure it, but don't know if I would need permissions on the repo...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning on just running them manually at each go. I don't think I release often enough to require CI/CD.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's good to have them just for the badge, too... :-P

@piranna
Copy link
Contributor Author

piranna commented Oct 12, 2016

Code updated with your suggested changes.

@benjamingr
Copy link
Owner

Thanks, I'll do a release when I'm back from holiday.

@benjamingr benjamingr merged commit f4d8e2f into benjamingr:master Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants