-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize examples into categorized folders #341
Conversation
…_with_object_wrap
e913f7f
to
142407e
Compare
@mhdawson @legendecas @gabrielschulhof @vmoroz got this updated per the discussion on the meeting last week. Here is the example of what landing on the repo will look like after this merges: |
@matthewkeil I think its starting to look good, but I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one suggestion/comment
Just getting back from vacation. Thanks for pushing that commit @legendecas . If that was the only thing left feel free to merge when you guys are ready @mhdawson |
Reorganized the examples into categorized folders and updated the
test_all
script for the new directory format.Here is the layout that was used. Each "category" has several examples and each example can have multiple versions of native integration (nan, node-addon-api, napi):
The
test_all.js
file was updated to reflect the new structure and I also massaged the output a bit at the end for a bit more feedback. The file was not originally running thetest
script in each package, it was just runninginstall
. I added a bit of logic to run thetest
script found in the package.json and then output whether the install works/doesnt, if a test was found/wasnt and if the test ran successfully. I found one that did not run successfully because the script was not setup in the package.json. There is a file in there that looks like a "test" case but its an infinite loop. Will fix that in a subsequent PR.Updated
test_all.js
output (after the output that was shown before):passed: /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/threadsafe-function/thread_safe_function_round_trip/napi passed: /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/threadsafe-function/threadsafe-async-iterator/node-addon-api passed: /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/threadsafe-function/typed_threadsafe_function/node-addon-api no test found: /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/threadsafe-function/promise-callback-demo/node-addon-api /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/threadsafe-function/thread_safe_function_counting/node-addon-api failed install: /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/general/6_object_wrap/napi failed tests: /Users/matthewkeil/Documents/dev/chainsafe/node-addon-examples/threadsafe-function/thread_safe_function_with_object_wrap/node-addon-api
Questions for how to make this better:
src
folder?