Skip to content

Commit

Permalink
Enable the package as no-op on Windows
Browse files Browse the repository at this point in the history
It won't really work, but at least it can be imported.
  • Loading branch information
orgads committed Dec 9, 2024
1 parent 6d7ebaa commit 9edb821
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 10 additions & 6 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
"targets": [
{
"target_name": "pcap_binding",
"sources": [ "pcap_binding.cc", "pcap_session.cc" ],
"conditions": [
['OS!="win"', {
"sources": [ "pcap_binding.cc", "pcap_session.cc" ],
"link_settings": {
"libraries": [
"-lpcap"
]
}
}],
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"link_settings": {
"libraries": [
"-lpcap"
]
}
},
{
"target_name": "action_after_build",
Expand Down
3 changes: 0 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
"engines": {
"node": ">=18.0.0"
},
"os": [
"!win32"
],
"scripts": {
"install": "prebuild-install || (node-gyp rebuild --release -j max && node-gyp clean)",
"rebuild": "node-gyp rebuild --release -j max",
Expand Down

0 comments on commit 9edb821

Please sign in to comment.