-
Notifications
You must be signed in to change notification settings - Fork 479
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
Move lib/server to index #583
Conversation
@@ -1,7 +1,7 @@ | |||
#!/usr/bin/env node | |||
|
|||
var cli = require('cli').enable('glob', 'version'), | |||
dust = require('../lib/server.js'), | |||
dust = require('../index.js'), |
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.
you can drop the .js
... you can also drop the index
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.
I didn't want to be cute... hehe
I actually always explicitly do .js
after @izs said in a blog post that he wished that the extension had never been made optional.
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.
being extra snarky just because this is purely a convention fix and IMO convention is to leave out the extensions.
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.
http://blog.izs.me/post/44149270867/why-no-directories-lib-in-node-the-less-snarky
grep "deeply regrettable"
My opinion on this is not held so strongly that I won't de-.js it if you feel really strongly on it.
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.
Changed them to just be '..'
👍 thanks! |
a468ef2
to
1b7b77e
Compare
This is the most common Node convention. It also makes it very clear that the `index.js` file is for Node by moving it away from the `lib` directory.
This is the most common Node convention. It also makes it very clear that the
server.js
file is for Node by moving it away from thelib
directory.