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

Move lib/server to index #583

Merged
merged 1 commit into from
Mar 25, 2015
Merged

Move lib/server to index #583

merged 1 commit into from
Mar 25, 2015

Conversation

sethkinast
Copy link
Contributor

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 the lib directory.

@@ -1,7 +1,7 @@
#!/usr/bin/env node

var cli = require('cli').enable('glob', 'version'),
dust = require('../lib/server.js'),
dust = require('../index.js'),
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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 '..'

@jimmyhchan
Copy link
Contributor

👍 thanks!

@sethkinast sethkinast force-pushed the server branch 2 times, most recently from a468ef2 to 1b7b77e Compare March 24, 2015 22:40
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.
prashn64 added a commit that referenced this pull request Mar 25, 2015
@prashn64 prashn64 merged commit c440dd0 into linkedin:master Mar 25, 2015
@sethkinast sethkinast deleted the server branch March 26, 2015 20:13
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.

3 participants