Socket
Book a DemoInstallSign in
Socket

react-lamp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lamp

A react UI package for working with the genie keyboard control library (https://github.com/kentcdodds/genie)

1.0.2
latest
npmnpm
Version published
Maintainers
1
Created
Source

react-lamp

A react UI package for working with the genie keyboard control library (https://github.com/kentcdodds/genie)

Demo: http://www.eliotk.net/react-lamp/demo

Usage

First istall the package:

npm install react-lamp --save

You also need install the GenieJS package separately if you haven't already:

npm install geniejs --save

And a basic approach for using the component with some wishes loaded into GenieJS:

import React from 'react';
import ReactDOM from 'react-dom';
import Lamp from 'react-lamp';
import Genie from 'geniejs';

const wishes = [
  {
    magicWords: ['Go to google'],
    action: function() {
      window.location.href = 'https://www.google.com';
    }
  }
];

wishes.forEach((wish) => {
  Genie(wish);
});

ReactDOM.render(<Lamp genie={Genie} />, document.getElementById('root'));

The key combo that shows and hides the lamp UI is: ctrl+space

Development

npm install

npm start

Go to localhost:8080

Testing with karma runner

npm test

Distributing

webpack --config webpack.dist.config.js

Updating the demo dist files

webpack --config webpack.demo.config.js --optimize-minimize

FAQs

Package last updated on 21 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.