add dev instructions and coverage script

This commit is contained in:
Michael Woods 2020-12-03 01:36:13 -05:00
parent 62c392ee2f
commit db7245dcb8
2 changed files with 15 additions and 2 deletions

View File

@ -49,10 +49,22 @@ MQTT_PASSWORD=
```
### Node.js
It's a typical node.js application, define the same environment values as described in the docker sections and run with:
`npm run start`. Currently only tested with Node.js 12.x.
`npm run start`. Currently, only tested with Node.js 12.x.
### Home Assistant configuration templates
MQTT auto discovery is enabled, for further integrations see [HA-MQTT.md](HA-MQTT.md).
MQTT auto discovery is enabled. For further integrations see [HA-MQTT.md](HA-MQTT.md).
## Development
### Running
`npm run start`
### Testing
`npm run test`
### Coverage
`rpm run coverage`
### Releases
`npm version [major|minor|patch] -m "Version %s" && git push --follow-tags`
Publish the release on GitHub to trigger a release build (ie, update 'latest' docker tag).
## TODO
1. Logging library

View File

@ -4,6 +4,7 @@
"description": "OnStarJS wrapper for MQTT",
"main": "src/index.js",
"scripts": {
"coverage": "nyc npm test",
"start": "node src/index.js",
"test": "mocha"
},