Skip to content

Commit dcd61d4

Browse files
authored
Merge pull request #31 from MatrixAI/pkgscripts
Changed to using scripts for polykeyWorker.js
2 parents 49edb80 + a17ca7c commit dcd61d4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"pkg": {
1717
"assets": [
1818
"node_modules/leveldown/**/*",
19-
"node_modules/utp-native/**/*",
20-
"dist/lib/workers/worker.js"
21-
]
19+
"node_modules/utp-native/**/*"
20+
],
21+
"scripts": "dist/lib/workers/worker.js"
2222
},
2323
"scripts": {
2424
"build": "tsc -p ./tsconfig.build.json",

src/bin/typescript-demo-lib.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { v4 as uuidv4 } from 'uuid';
77
import testWorkers from '../lib/workers/test-workers';
88
import testLevel from '../lib/test-level';
99
import testUtpNative from '../lib/test-utp-native';
10+
import * as os from 'os';
1011

1112
async function main(argv = process.argv): Promise<number> {
1213
// Print out command-line arguments
@@ -28,7 +29,7 @@ async function main(argv = process.argv): Promise<number> {
2829
process.stdout.write(nums.num1 + ' + ' + nums.num2 + ' = ' + sum + '\n');
2930

3031
// Testing native modules
31-
const dir = argv[2] ?? '/tmp';
32+
const dir = argv[2] ?? os.tmpdir();
3233
await testLevel(dir);
3334
await testWorkers();
3435
await testUtpNative();

0 commit comments

Comments
 (0)