From 8b91ef3dcb383c95df4852bdfec6069e4ed2d602 Mon Sep 17 00:00:00 2001 From: Sebastian Clausen Date: Tue, 28 Feb 2023 00:05:26 +0100 Subject: [PATCH] fix: readme and publish script --- package-lock.json | 4 ++-- package.json | 3 ++- projects/ngx-mqtt/README.md | 27 +++++++-------------------- projects/ngx-mqtt/package.json | 3 ++- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd35178..8b693aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ngx-mqtt", - "version": "15.0.0", + "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ngx-mqtt", - "version": "15.0.0", + "version": "0.0.0", "license": "MIT", "dependencies": { "@angular/animations": "^15.1.0", diff --git a/package.json b/package.json index 042611c..3aa21c6 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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, diff --git a/projects/ngx-mqtt/README.md b/projects/ngx-mqtt/README.md index 29a0760..9bb80f5 100644 --- a/projects/ngx-mqtt/README.md +++ b/projects/ngx-mqtt/README.md @@ -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. diff --git a/projects/ngx-mqtt/package.json b/projects/ngx-mqtt/package.json index 1314a8a..38493c2 100644 --- a/projects/ngx-mqtt/package.json +++ b/projects/ngx-mqtt/package.json @@ -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"