Skip to content

Commit 34f7d5e

Browse files
committed
update header files references
1 parent 2098590 commit 34f7d5e

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

01_bare_minimum/modulename.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include <node/v8.h>
2-
#include <node/node.h>
1+
#include <node.h>
32

43
void RegisterModule(v8::Handle<v8::Object> target) {
54
// You can add properties to the module in this function. It is called

02_functions/modulename.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include <node/v8.h>
2-
#include <node/node.h>
1+
#include <node.h>
32

43
// C standard library
54
#include <cstdlib>

03_function_arguments/modulename.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include <node/v8.h>
2-
#include <node/node.h>
1+
#include <node.h>
32

43
using namespace v8;
54

04_callback_functions/modulename.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include <node/v8.h>
2-
#include <node/node.h>
1+
#include <node.h>
32

43
using namespace v8;
54

05_threadpool/modulename.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include <node/v8.h>
2-
#include <node/node.h>
1+
#include <node.h>
32
#include <string>
43

54
using namespace v8;

06_objects/modulename.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include <node/v8.h>
2-
#include <node/node.h>
1+
#include <node.h>
32

43
#include "modulename.hpp"
54

06_objects/modulename.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#ifndef MODULENAME_HPP
22
#define MODULENAME_HPP
33

4-
#include <v8.h>
54
#include <node.h>
65

6+
7+
// Do not include this line. It's generally frowned upon to use namespaces
8+
// in header files as it may cause issues with other code that includes your
9+
// header file.
10+
// using namespace v8;
11+
12+
713
class MyObject : public node::ObjectWrap {
814
public:
915
static v8::Persistent<v8::FunctionTemplate> constructor;

0 commit comments

Comments
 (0)