Giter Site home page Giter Site logo

christianulbrich / ngx-mqtt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sclausen/ngx-mqtt

0.0 1.0 0.0 3.11 MB

This library isn't just a wrapper around MQTT.js for angular. It uses observables and takes care of subscription handling and message routing.

Home Page: https://sclausen.github.io/ngx-mqtt/

License: MIT License

TypeScript 89.22% JavaScript 10.78%

ngx-mqtt's Introduction

ngx-mqtt npm Travis

This library isn't just a wrapper around MQTT.js for angular >= 2. It uses observables and takes care of subscription handling and message routing.

For reasons of convenience, I removed the copied typings from mqtt.js and added it as a dev-dependency while still bundling the browserified latest version of it. 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, because this is a browser library where you can't conntect with something other than websockets. You also can't use key, cert and ca for the same reasons.

If you have any issues using this library, please visit it's homepage and look for similar issues in the issue tracker before you file a bug.

ngx-mqtt >= 7 is only compatible with angular >= 9

Local development

For local development all peer dependency automatically installed during install. Also please be aware that exact MQTT version used as dependency, you need to manually bump it if it will update.

Publish new version

To follow semver helper scripts was added npm run release:patch etc. Those commands will autoupdate changelog and dependant package.json's

Unfortunately command npm publish is broken due to nature of ng-packager. It's substituted with npm run publish, which will correctly build and publish production build

Webpack shimming

ngx-mqtt depends on mqtt package which uses node globals. In order to make it run inside browser it includes a postinstall script which patches Angular webpack config of the project it was imported into. To disable this, you have to set MQTT_DISABLE_HOOK environmental variable while installing this package. MQTT_DISABLE_HOOK=true npm i

ngx-mqtt's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.