mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
fix: find arduino
This commit is contained in:
parent
191409a682
commit
34ccc2edee
2 changed files with 7 additions and 6 deletions
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/env node
|
||||
#!/usr/bin/env node -r esbuild-register
|
||||
|
||||
// outputs the path to an Arduino to stdout or an error to stderror
|
||||
|
||||
const SerialPort = require('../packages/serialport')
|
||||
SerialPort.list().then(ports => {
|
||||
import { autoDetect } from '../lib'
|
||||
|
||||
autoDetect().list().then(ports => {
|
||||
const port = ports.find(port => /arduino/i.test(port.manufacturer))
|
||||
if (!port) {
|
||||
console.error('Arduino Not found')
|
||||
|
|
@ -61,10 +61,10 @@
|
|||
"prebuildify-cross": "prebuildify-cross --napi --target 14.0.0 --force --strip --verbose",
|
||||
"rebuild": "node-gyp rebuild",
|
||||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
||||
"format": "eslint lib test --fix",
|
||||
"lint": "eslint lib test && cc --verbose",
|
||||
"format": "eslint lib test bin --fix",
|
||||
"lint": "eslint lib test bin && cc --verbose",
|
||||
"test": "nyc --reporter=html --reporter=text --reporter lcovonly mocha",
|
||||
"test:arduino": "TEST_PORT=$(./bin/find-arduino.js) npm test",
|
||||
"test:arduino": "TEST_PORT=$(./bin/find-arduino.ts) npm test",
|
||||
"test:watch": "mocha -w",
|
||||
"semantic-release": "semantic-release",
|
||||
"typecheck": "tsc"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue