Skip to content

Commit ea62a14

Browse files
committed
Demonstrating Native Addons with C/C++
1 parent f88428d commit ea62a14

13 files changed

+1854
-492
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
/dist
33
.env*
44
!.env.example
5+
# nix
56
/result*
67
/builds
8+
# node-gyp
9+
/build
10+
# prebuildify
11+
/prebuilds
712

813
# Logs
914
logs

Diff for: .gitlab-ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ lint:
1515
image: registry.gitlab.com/matrixai/engineering/maintenance/gitlab-runner
1616
script:
1717
- >
18-
nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
19-
npm install;
18+
nix-shell --run '
2019
npm run lint;
2120
'
2221
@@ -25,8 +24,7 @@ test:
2524
image: registry.gitlab.com/matrixai/engineering/maintenance/gitlab-runner
2625
script:
2726
- >
28-
nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
29-
npm install;
27+
nix-shell --run '
3028
npm run test;
3129
'
3230

Diff for: .npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
/tmp
1313
/docs
1414
/benches
15+
/build
1516
/builds

Diff for: binding.gyp

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"targets": [{
3+
"target_name": "native",
4+
"include_dirs": [
5+
"<!(node -e \"require('napi-macros')\")"
6+
],
7+
"sources": ["./src/native/index.cpp"]
8+
}]
9+
}

0 commit comments

Comments
 (0)