Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ examples in `tests/examples/`. Useful commands are:
```bash
npm run build # Compile the package
npm run test:all # Build and run all tests
npm run test:example # Run example (requires recursive submodules)
npm run test:example # Run example (example.ts requires recursive submodules)
```

The repository uses a recursive WARDuino/WABT test fixture for hardware and
Expand Down
Binary file modified assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions bin/latch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

const {resolve} = require('node:path');

const [testFile, ...testArguments] = process.argv.slice(2);

if (!testFile || testFile === '--help' || testFile === '-h') {
const output = testFile ? console.log : console.error;
output('Usage: latch <test-file.ts> [arguments]');
process.exitCode = testFile ? 0 : 1;
} else {
process.argv = [process.argv[0], resolve(testFile), ...testArguments];
require('ts-node/register/transpile-only');
require(process.argv[1]);
}
7 changes: 5 additions & 2 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
},
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
"bin": {
"latch": "./bin/latch.js"
},
"files": [
"dist",
"bin"
Expand All @@ -49,7 +52,8 @@
"react": "^17.0.2",
"source-map": "^0.7.6",
"ts-node": "^10.9.2",
"tslib": "^2.8.1"
"tslib": "^2.8.1",
"typescript": "^6.0.3"
},
"devDependencies": {
"@ava/typescript": "^7.0.0",
Expand All @@ -70,7 +74,6 @@
"ink-testing-library": "^2.1.0",
"mqtt": "^5.15.1",
"serialport": "^13.0.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.60.1"
},
"ava": {
Expand Down
Loading