snootforge

chee/kasa

a javascript for kasa veho lightbulbs

add require-self and take advantage of it in play/
0ea3ddd34e54ea6c70d28d5e4bf67e143b4dbb20
  1. Fdiff --git a/package.json b/package.json
  2. index fe3ebd0..0c335cb 100644
  3. --- a/package.json
  4. +++ b/package.json
  5. H@@ -24,6 +24,10 @@
  6. "devDependencies": {
  7. "body-parser": "^1.17.2",
  8. "express": "^4.15.3",
  9. - "tinygradient": "^0.3.1"
  10. + "tinygradient": "^0.3.1",
  11. + "require-self": "^0.2.1"
  12. + },
  13. + "scripts": {
  14. + "prepare": "require-self"
  15. }
  16. }
  1. Fdiff --git a/play/cli.js b/play/cli.js
  2. index a634fe9..1dcea73 100644
  3. --- a/play/cli.js
  4. +++ b/play/cli.js
  5. H@@ -1,5 +1,5 @@
  6. const {createInterface} = require('readline')
  7. -const {discover, pair, setColor} = require('..')
  8. +const {discover, pair, setColor} = require('kasa')
  9. const blubs = []
  10. const paired = []
  1. Fdiff --git a/play/go.js b/play/go.js
  2. index d59281c..e32244d 100644
  3. --- a/play/go.js
  4. +++ b/play/go.js
  5. H@@ -1,4 +1,4 @@
  6. -const Blub = require('..')
  7. +const Blub = require('kasa')
  8. const blubs = []
  9. const paired = []
  1. Fdiff --git a/play/promise/blue.js b/play/promise/blue.js
  2. index 24dffd6..388f258 100644
  3. --- a/play/promise/blue.js
  4. +++ b/play/promise/blue.js
  5. H@@ -1,4 +1,4 @@
  6. -const {discover, setColor, pair, stop = process.exit} = require('../..')
  7. +const {discover, setColor, pair, stop = process.exit} = require('kasa')
  8. const setColorWithDispatch = (...color) => dispatch => dispatch(setColor(...color, 0xff))
  1. Fdiff --git a/play/promise/pink.js b/play/promise/pink.js
  2. index 007bbdf..799d035 100644
  3. --- a/play/promise/pink.js
  4. +++ b/play/promise/pink.js
  5. H@@ -1,4 +1,4 @@
  6. -const {discover, setColor, pair, stop = process.exit} = require('../..')
  7. +const {discover, setColor, pair, stop = process.exit} = require('kasa')
  8. const setColorWithDispatch = (...color) => dispatch => dispatch(setColor(...color, 0xff))
  1. Fdiff --git a/play/socket.js b/play/socket.js
  2. index 00c93eb..62352e7 100644
  3. --- a/play/socket.js
  4. +++ b/play/socket.js
  5. H@@ -1,6 +1,6 @@
  6. const fs = require('fs')
  7. const net = require('net')
  8. -const Blub = require('..')
  9. +const Blub = require('kasa')
  10. const blubs = []
  11. const paired = []