<commit_before><img align="right" src="https://raw.github.com/cliffano/buildlight/master/avatar.jpg" alt="Avatar"/>

[![Build Status](https://github.com/cliffano/buildlight/workflows/CI/badge.svg)](https://github.com/cliffano/buildlight/actions?query=workflow%3ACI)
[![Vulnerabilities Status](https://snyk.io/test/github/cliffano/buildlight/badge.svg)](https://snyk.io/test/github/cliffano/buildlight)
[![Dependencies Status](https://img.shields.io/david/cliffano/buildlight.svg)](http://david-dm.org/cliffano/buildlight)
[![Coverage Status](https://img.shields.io/coveralls/cliffano/buildlight.svg)](https://coveralls.io/r/cliffano/buildlight?branch=master)
[![Published Version](https://img.shields.io/npm/v/buildlight.svg)](http://www.npmjs.com/package/buildlight)
<br/>

BuildLight
----------

BuildLight is a node.js library for [Delcom USB Visual Indicator](http://www.delcomproducts.com/products_usblmp.asp).

This is handy when you want to control Delcom build light device from node.js . It currently only supports Linux platform with device generation 1 via usbled.

Installation
------------

    npm install buildlight

Usage
-----

    import BuildLight from '../lib/buildlight.js';
    const buildLight = new BuildLight();

    // switch on all colours
    buildLight.on();

    // switch off all colours
    buildLight.off();

    // switch on one colour
    buildLight.red();
    buildLight.green();
    buildLight.blue();

    // to use custom colour scheme
    buildLight = new BuildLight({ scheme: ['red', 'green', 'yellow'] });
    buildLight.yellow();

    // blinks with green colour then switch on blue when unblink is called 5 seconds later
    buildLight.blink('green', function (err) {
      if (err) {
        buildLight.red();
      }
    });
    setTimeout(function () {
      buildLight.unblink(function () {
        buildLight.blue();
      });
    }, 5000);

Colophon
--------

[Developer's Guide](http://cliffano.github.io/developers_guide.html#nodejs)

Build reports:

* [Code complexity report](http://cliffano.github.io/buildlight/complexity/plato/index.html)
* [Unit tests report](http://cliffano.github.io/buildlight/test/mocha.txt)
* [Test coverage report](http://cliffano.github.io/buildlight/coverage/c8/index.html)
* [Integration tests report](http://cliffano.github.io/buildlight/test-integration/mocha.txt)
* [API Documentation](http://cliffano.github.io/buildlight/doc/jsdoc/index.html)<commit_msg>Update GH pages links to use https<commit_after><img align="right" src="https://raw.github.com/cliffano/buildlight/master/avatar.jpg" alt="Avatar"/>

[![Build Status](https://github.com/cliffano/buildlight/workflows/CI/badge.svg)](https://github.com/cliffano/buildlight/actions?query=workflow%3ACI)
[![Vulnerabilities Status](https://snyk.io/test/github/cliffano/buildlight/badge.svg)](https://snyk.io/test/github/cliffano/buildlight)
[![Dependencies Status](https://img.shields.io/david/cliffano/buildlight.svg)](http://david-dm.org/cliffano/buildlight)
[![Coverage Status](https://img.shields.io/coveralls/cliffano/buildlight.svg)](https://coveralls.io/r/cliffano/buildlight?branch=master)
[![Published Version](https://img.shields.io/npm/v/buildlight.svg)](http://www.npmjs.com/package/buildlight)
<br/>

BuildLight
----------

BuildLight is a node.js library for [Delcom USB Visual Indicator](http://www.delcomproducts.com/products_usblmp.asp).

This is handy when you want to control Delcom build light device from node.js . It currently only supports Linux platform with device generation 1 via usbled.

Installation
------------

    npm install buildlight

Usage
-----

    import BuildLight from '../lib/buildlight.js';
    const buildLight = new BuildLight();

    // switch on all colours
    buildLight.on();

    // switch off all colours
    buildLight.off();

    // switch on one colour
    buildLight.red();
    buildLight.green();
    buildLight.blue();

    // to use custom colour scheme
    buildLight = new BuildLight({ scheme: ['red', 'green', 'yellow'] });
    buildLight.yellow();

    // blinks with green colour then switch on blue when unblink is called 5 seconds later
    buildLight.blink('green', function (err) {
      if (err) {
        buildLight.red();
      }
    });
    setTimeout(function () {
      buildLight.unblink(function () {
        buildLight.blue();
      });
    }, 5000);

Colophon
--------

[Developer's Guide](https://cliffano.github.io/developers_guide.html#nodejs)

Build reports:

* [Code complexity report](https://cliffano.github.io/buildlight/complexity/plato/index.html)
* [Unit tests report](https://cliffano.github.io/buildlight/test/mocha.txt)
* [Test coverage report](https://cliffano.github.io/buildlight/coverage/c8/index.html)
* [Integration tests report](https://cliffano.github.io/buildlight/test-integration/mocha.txt)
* [API Documentation](https://cliffano.github.io/buildlight/doc/jsdoc/index.html)
{'fraction_non_alphanumeric': 0.16364746590677792, 'fraction_numerical': 0.003256665988194586, 'mean_word_length': 3.8413793103448275, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 24, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4240087', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1541, 'n_words': 283}