add dev instructions and coverage script
This commit is contained in:
parent
62c392ee2f
commit
db7245dcb8
16
README.md
16
README.md
@ -49,10 +49,22 @@ MQTT_PASSWORD=
|
|||||||
```
|
```
|
||||||
### Node.js
|
### Node.js
|
||||||
It's a typical node.js application, define the same environment values as described in the docker sections and run with:
|
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
|
### 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
|
## TODO
|
||||||
1. Logging library
|
1. Logging library
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"description": "OnStarJS wrapper for MQTT",
|
"description": "OnStarJS wrapper for MQTT",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"coverage": "nyc npm test",
|
||||||
"start": "node src/index.js",
|
"start": "node src/index.js",
|
||||||
"test": "mocha"
|
"test": "mocha"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user