Skip to content

Commit

Permalink
fix: readme and publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
sclausen committed May 16, 2023
1 parent 786cd0d commit 8b91ef3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mqtt",
"version": "15.0.0-alpha.0",
"version": "0.0.0",
"description": "ngx mqtt client library",
"repository": {
"type": "git",
Expand Down Expand Up @@ -30,6 +30,7 @@
"ng": "ng",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"publishx": "npm run build && npm publish dist/ngx-mqtt/",
"test": "ng test"
},
"private": true,
Expand Down
27 changes: 7 additions & 20 deletions projects/ngx-mqtt/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# NgxMqtt
# ngx-mqtt [![npm](https://img.shields.io/npm/v/ngx-mqtt.svg)](https://www.npmjs.com/package/ngx-mqtt) [![Travis](https://img.shields.io/travis/sclausen/ngx-mqtt.svg)](https://travis-ci.org/sclausen/ngx-mqtt)

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.1.0.
This library isn't just a wrapper around MQTT.js for angular.
It uses observables and takes care of subscription handling and message routing.

## Code scaffolding
Since it's based on the browserified version of mqtt.js, this means although you have the possibility to use `mqtt`, `mqtts`, `tcp`, `ssl`, `wx` or `wxs` as the protocol in the client options, you can't use it, because this is a browser library where you can't conntect with mqtt directly via tcp, but with websockets. You also can't use `key`, `cert` and `ca` for the same reasons.

Run `ng generate component component-name --project ngx-mqtt` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-mqtt`.
> Note: Don't forget to add `--project ngx-mqtt` or else it will be added to the default project in your `angular.json` file.
If you have any issues using this library, please visit it's [homepage](https://sclausen.github.io/ngx-mqtt/) and look for similar issues in the issue tracker before you file a bug.

## Build

Run `ng build ngx-mqtt` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build ngx-mqtt`, go to the dist folder `cd dist/ngx-mqtt` and run `npm publish`.

## Running unit tests

Run `ng test ngx-mqtt` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
## Local development
For local development all peer dependency automatically installed during install.
3 changes: 2 additions & 1 deletion projects/ngx-mqtt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ngx-mqtt",
"version": "0.0.1",
"version": "15.0.0-alpha.1",
"license": "MIT",
"peerDependencies": {
"@angular/common": "^15.1.0",
"@angular/core": "^15.1.0"
Expand Down

0 comments on commit 8b91ef3

Please sign in to comment.