File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
packages/node-addon-examples
examples/1-getting-started/2_function_arguments_twisted/napi Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ const addon = require ( 'bindings' ) ( 'addon_twisted.node' )
2
+
3
+ console . log ( 'This should be eight:' , addon . add ( 3 , 5 ) )
Original file line number Diff line number Diff line change 2
2
"name" : " @callstackincubator/example-3" ,
3
3
"version" : " 0.0.0" ,
4
4
"description" : " Node.js Addons Example #2" ,
5
- "main" : " ./build/Release/addon_twisted.node " ,
5
+ "main" : " ./index.js " ,
6
6
"private" : true ,
7
7
"dependencies" : {
8
8
"bindings" : " ~1.5.0"
9
9
},
10
10
"scripts" : {
11
- "test" : " node addon .js"
11
+ "test" : " node index .js"
12
12
},
13
13
"binary" : {
14
14
"napi_versions" : [4 ]
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ module.exports = {
5
5
"1_hello_world/node-addon-api-addon-class" : ( ) => require ( "./examples/1-getting-started/1_hello_world/node-addon-api-addon-class/hello.js" ) ,
6
6
"2_function_arguments/napi" : ( ) => require ( "./examples/1-getting-started/2_function_arguments/napi/addon.js" ) ,
7
7
"2_function_arguments/node-addon-api" : ( ) => require ( "./examples/1-getting-started/2_function_arguments/node-addon-api/addon.js" ) ,
8
- "2_function_arguments_twisted/napi" : ( ) => require ( "@callstackincubator/example-3" ) ,
8
+ // "2_function_arguments_twisted/napi": () => require("@callstackincubator/example-3"),
9
+ "2_function_arguments_twisted/napi" : ( ) => require ( "./examples/1-getting-started/2_function_arguments_twisted/napi/index.js" ) ,
9
10
"3_callbacks/napi" : ( ) => require ( "./examples/1-getting-started/3_callbacks/napi/addon.js" ) ,
10
11
"3_callbacks/node-addon-api" : ( ) => require ( "./examples/1-getting-started/3_callbacks/node-addon-api/addon.js" ) ,
11
12
"4_object_factory/napi" : ( ) => require ( "./examples/1-getting-started/4_object_factory/napi/addon.js" ) ,
You can’t perform that action at this time.
0 commit comments