Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

[assignment 2] Convert version route to plugin #44

Merged
merged 1 commit into from
Mar 24, 2015

Conversation

MylesBorins
Copy link
Contributor

Closes #43


// Register plugin
exports.register = function (server, options, next) {
server.route({
Copy link
Contributor

Choose a reason for hiding this comment

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

newline after function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it!

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@MylesBorins MylesBorins force-pushed the assignment-2 branch 5 times, most recently from bb0485c to 462de95 Compare March 18, 2015 17:32
}
});

next();

Choose a reason for hiding this comment

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

This is a callback so return

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call!

@hueniverse hueniverse added this to the 0.0.2 milestone Mar 18, 2015
@ai10
Copy link

ai10 commented Mar 19, 2015

Do we want to check if the version is a valid semver?

@AdriVanHoudt
Copy link
Contributor

@Sschuck the version comes from package.json and that should always follow semver, so no need to check

var internals = {};

var internals = {
version: require('./version')

Choose a reason for hiding this comment

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

This is odd. Just var Version = require('./version'); at the top and then use that in register().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@MylesBorins MylesBorins force-pushed the assignment-2 branch 2 times, most recently from 8ae937a to 6961d7f Compare March 22, 2015 19:51
@@ -2,35 +2,25 @@

var Hapi = require('hapi');
var Hoek = require('hoek');
var Package = require('../package.json');

Choose a reason for hiding this comment

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

No empty line 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.

In personal projects I have always put a new line between modules that are included from node_modules and modules that are being included locally from the project.

That aside the style has been fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also like to do this, makes it easier to see what are local modules

Choose a reason for hiding this comment

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

I just sort them: node, npm, local.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reasonable... I follow the same pattern (with spaces).

Thanks for taking the tie to discuss

Copy link
Contributor

Choose a reason for hiding this comment

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

same sorting here only with newlines in between

hueniverse pushed a commit that referenced this pull request Mar 24, 2015
[assignment 2] Convert version route to plugin
@hueniverse hueniverse merged commit fa3f5cc into outmoded:master Mar 24, 2015
hueniverse pushed a commit that referenced this pull request Mar 24, 2015
hueniverse pushed a commit that referenced this pull request Mar 24, 2015
MylesBorins pushed a commit to MylesBorins/hueniversity that referenced this pull request Mar 31, 2015
MylesBorins pushed a commit to MylesBorins/hueniversity that referenced this pull request Mar 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert to a plugin
4 participants