Skip to content

Commit f361d13

Browse files
Move to TypeScript (#14)
1 parent 8567e9e commit f361d13

17 files changed

Lines changed: 7703 additions & 2308 deletions

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pnpm-lock.yaml merge=binary
2+
shrinkwrap.yaml merge=binary
3+
npm-shrinkwrap.json merge=binary
4+
yarn.lock merge=binary
5+
*.json linguist-language=JSON-with-Comments
6+
*.ts text eol=lf
7+
*.js text eol=lf
8+
*.json text eol=lf
9+
*.md text eol=lf
10+
.cpp text eol=lf

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ jobs:
4040
npm install request
4141
4242
# Build on the current platform
43-
- name: Build
43+
- name: Build native addon
4444
run: npm run build
4545

46+
# Compile the module with tsc
47+
- name: Build module
48+
run: npm run tsc
49+
4650
# Runs all tests with the current build
4751
- name: Test
4852
run: npm test

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ jobs:
5252
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
5353

5454
# Build on the current platform
55-
- name: Build
55+
- name: Build native addon
5656
run: npm run build
5757

58+
# Compile the module with tsc
59+
- name: Build module
60+
run: npm run tsc
61+
5862
# Runs all tests with the current build
5963
- name: Test
6064
run: npm test
@@ -114,6 +118,7 @@ jobs:
114118
node-version: '16.x'
115119
registry-url: 'https://registry.npmjs.org'
116120
- run: npm install
121+
- run: npm run tsc
117122
- run: npm publish
118123
env:
119124
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,62 @@
1-
.DS_Store
2-
binding.node
3-
build
4-
node_modules
5-
utimes_fixtures
6-
lib
1+
logs
2+
*.log
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
lerna-debug.log*
7+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
8+
pids
9+
*.pid
10+
*.seed
11+
*.pid.lock
12+
lib-cov
13+
coverage
14+
*.lcov
15+
.nyc_output
16+
.grunt
17+
bower_components
18+
.lock-wscript
19+
build/
20+
node_modules/
21+
jspm_packages/
22+
typings/
23+
*.tsbuildinfo
24+
.npm
25+
.eslintcache
26+
.stylelintcache
27+
.rpt2_cache/
28+
.rts2_cache_cjs/
29+
.rts2_cache_es/
30+
.rts2_cache_umd/
31+
.node_repl_history
32+
*.tgz
33+
.yarn-integrity
34+
.env
35+
.env.test
36+
.env*.local
37+
.cache
38+
.parcel-cache
39+
.next
40+
.nuxt
41+
dist
42+
.out
43+
.storybook-out
44+
storybook-static
45+
dist/
46+
.cache/
47+
.vuepress/dist
48+
.serverless/
49+
.fusebox/
50+
.dynamodb/
51+
.tern-port
52+
.vscode-test
53+
.vscode/*
54+
!.vscode/tasks.json
55+
!.vscode/launch.json
56+
*.code-workspace
57+
.vs
58+
tmp/
59+
temp/
60+
.history
61+
.ionide
62+
artifacts/

binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
},
2121
"sources": [
22-
"src/addon/binding.cc"
22+
"cpp/binding.cc"
2323
],
2424
"include_dirs": [
2525
"<!(node -p \"require('node-addon-api').include_dir\")"
File renamed without changes.

0 commit comments

Comments
 (0)