napajs/examples/modules
hemirt 3e472ac555 Fix small typos (#269)
* Fix typos

* Fix typos

* Fix typos

* Fix typos

* Fix typos

* Fix typo

* Fix typo
2018-10-29 13:34:56 -07:00
..
async-number Fix small typos (#269) 2018-10-29 13:34:56 -07:00
hello-world Fix napajs example module (#118) 2017-11-06 17:22:53 -08:00
plus-number Fix some small typos (#267) 2018-10-29 13:32:43 -07:00
README.md Fix small typos (#269) 2018-10-29 13:34:56 -07:00

README.md

Napa module source tree

The source codes can be organized as the structure below.

+-- napa-module-example
    +-- inc
    |   +-- example.h
    +-- lib
    |   +-- example.ts
    |   +-- tsconfig.json
    +-- napa
    |   +-- addon.cpp
    |   +-- CMakeLists.txt (cmake specific)
    |   +-- example-wrap.cpp
    |   +-- example-wrap.h
    +-- src
    |   +-- CMakeLists.txt (cmake specific)
    |   +-- example.cpp
    +-- test
    |   +-- test.ts
    |   +-- tsconfig.json
    +-- binding.gyp (gyp specific)
    +-- CMakeLists.txt (cmake specific)
    +-- package.json
    +-- README.md

How to build and test ?

For the module examples, node-gyp or cmake-js build solution is provided for your reference.

Please make sure node-gyp or cmake-js has been set up correctly at your client, then you could follow the steps below to build and test the module examples.

1. go to the directory of a module example
2. run "npm install" to build the module
3. run "npm test" to build and run the module test, as well as its unittest if any