Skip to content

Conversation

@justus-hildebrand
Copy link
Collaborator

Only works with this pull request.


node::lib::Initialize();
node::lib::RegisterModule("CppDemoModule", {
node::lib::RegisterModule("cppDemoModule", {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you're at it, maybe rename the module to cpp-demo-module? (see https://www.npmjs.com/package/module-best-practices#naming-conventions). This would obviously break the auto_bind option. Maybe convert cpp-demo-module into cppDemoModule inside the RegisterModule function automatically?
Just a thought, though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe convert cpp-demo-module into cppDemoModule inside the RegisterModule function automatically?

I think converting the module-name inside of RegisterModule() is a bad idea, since it likely is not what the programmer consuming the API would expect. Instead, we should just change the JS code in rss_feed.js to comply with the name change.

I initially made the change you commented on so I didn't have to change all the JS-code, but with the bigger change this should be OK.

Copy link
Collaborator

@cmfcmf cmfcmf left a comment

Choose a reason for hiding this comment

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

Looks good now, feel free to merge after hpicgs/node#38

@justus-hildebrand justus-hildebrand merged commit ea2ef0a into master Jan 24, 2018
@justus-hildebrand justus-hildebrand deleted the module-auto-bind branch January 24, 2018 10:58
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