electron-blink1-toy
Advanced tools
Comparing version 0.2.0 to 0.3.0
143
app/app.js
@@ -0,20 +1,20 @@ | ||
// electron-blink1-toy | ||
// @todbot | ||
"use strict"; | ||
var React = require('react'); | ||
var ReactDOM = require('react-dom'); | ||
const React = require('react'); | ||
const ReactDOM = require('react-dom'); | ||
var Row = require('react-bootstrap').Row; | ||
var Col = require('react-bootstrap').Col; | ||
var Grid = require('react-bootstrap').Grid; | ||
// var ButtonToolbar = require('react-bootstrap').ButtonToolbar; | ||
// var Button = require('react-bootstrap').Button; | ||
// var Input = require('react-bootstrap').Input; | ||
var tinycolor = require('tinycolor2'); | ||
const Row = require('react-bootstrap').Row; | ||
const Col = require('react-bootstrap').Col; | ||
const Container = require('react-bootstrap').Container; | ||
var blink1 = null; | ||
var devices = []; | ||
const tinycolor = require('tinycolor2'); | ||
var Blink1 = require('node-blink1'); | ||
devices = Blink1.devices(); // returns array of serial numbers | ||
const Blink1 = require('node-blink1'); | ||
let blink1 = null; | ||
let devices = Blink1.devices(); // returns array of serial numbers | ||
if( devices.length ) { // have at least one blink(1) plugged in | ||
@@ -35,60 +35,73 @@ console.log("Found blink1 devices: ", devices); | ||
var App = React.createClass({ | ||
class Blink1ToyApp extends React.Component { | ||
getInitialState: function() { | ||
return { | ||
}; | ||
}, | ||
changeColor: function(colorstr) { | ||
// console.log("changing blink1 color",evt, evt.target.value, JSON.stringify(evt.target)); | ||
// var colorstr = evt.target.value; | ||
var c = tinycolor(colorstr).toRgb(); | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
value: null, | ||
}; | ||
} | ||
if( blink1 ) { | ||
// blink1.fadeToRGB(100, 255,0,255 ); | ||
blink1.fadeToRGB(100, c.r, c.g, c.b ); | ||
} | ||
}, | ||
changeColor(colorstr) { | ||
// console.log("changing blink1 color",evt, evt.target.value, JSON.stringify(evt.target)); | ||
// var colorstr = evt.target.value; | ||
var c = tinycolor(colorstr).toRgb(); | ||
if( blink1 ) { | ||
// blink1.fadeToRGB(100, 255,0,255 ); | ||
blink1.fadeToRGB(100, c.r, c.g, c.b ); | ||
} | ||
}; | ||
render: function() { | ||
var self = this; | ||
var makeDevList = function() { | ||
if( !devices.length ) { | ||
return ( <h4> No blink(1) devices found. Insert blink(1) and restart app. </h4> ); | ||
} | ||
return ( | ||
<h4> blink(1) device found: <b>{devices[0]}</b></h4> | ||
); | ||
}; | ||
var makeButton = function(colorstr) { | ||
return ( | ||
<button type="button" style={{width:20, height:20, margin:5, background:colorstr}} | ||
onClick={self.changeColor.bind(null,colorstr)}/> // FIXME: don't quite understand the .bind(null,...) | ||
); | ||
}; | ||
return ( | ||
<Grid> | ||
<h1> Electron blink(1) Toy! </h1> | ||
{makeDevList()} | ||
<Row> | ||
<Col xs={12}> | ||
<h3> Click to change color </h3> | ||
{makeButton('#000000')} | ||
{makeButton('#ff0000')} | ||
{makeButton('#00ff00')} | ||
{makeButton('#0000ff')} | ||
{makeButton('#ff00ff')} | ||
{makeButton('#00ffff')} | ||
{makeButton('#ffff00')} | ||
{makeButton('#ffffff')} | ||
</Col> | ||
</Row> | ||
</Grid> | ||
render() { | ||
var self = this; | ||
var makeDevList = function() { | ||
if( !devices.length ) { | ||
return ( <h4> No blink(1) devices found. Insert blink(1) and restart app. </h4> ); | ||
} | ||
return ( | ||
<h4> blink(1) device found: <b>{devices[0]}</b></h4> | ||
); | ||
}; | ||
var makeButton = function(colorstr) { | ||
return ( | ||
<button type="button" style={{width:20, height:20, margin:5, background:colorstr}} | ||
onClick={self.changeColor.bind(null,colorstr)}/> // FIXME: don't quite understand the .bind(null,...) | ||
); | ||
} | ||
}); | ||
}; | ||
//ReactDOM.render( <App />, document.getElementById('example') ); | ||
return ( | ||
<Container style={{padding:25}}> | ||
<Row> | ||
<Col> | ||
<h1> Electron blink(1) Toy! </h1> | ||
{makeDevList()} | ||
</Col> | ||
</Row> | ||
ReactDOM.render(<App />, document.getElementById('app')) | ||
<Row> | ||
<Col> | ||
<h3> Click to change color </h3> | ||
{makeButton('#000000')} | ||
{makeButton('#ff0000')} | ||
{makeButton('#00ff00')} | ||
{makeButton('#0000ff')} | ||
{makeButton('#ff00ff')} | ||
{makeButton('#00ffff')} | ||
{makeButton('#ffff00')} | ||
{makeButton('#ffffff')} | ||
</Col> | ||
</Row> | ||
</Container> | ||
); | ||
} | ||
} | ||
//ReactDOM.render(<App />, document.getElementById('app')) | ||
ReactDOM.render( | ||
<Blink1ToyApp />, | ||
document.getElementById('app') | ||
); |
@@ -0,1 +1,4 @@ | ||
// electron-blink1-toy | ||
// @todbot | ||
'use strict' | ||
@@ -21,16 +24,16 @@ | ||
// | ||
var loadurl = 'file://' + __dirname + '/build/index.html'; | ||
window.loadURL( loadurl ); | ||
// if (isDevelopment) { | ||
// window.loadURL(`http://localhost:8082/`); //`${process.env.ELECTRON_WEBPACK_WDS_PORT}`) | ||
// } | ||
if (isDevelopment) { | ||
loadurl = 'http://localhost:8082/'; //`${process.env.ELECTRON_WEBPACK_WDS_PORT}`) | ||
} | ||
// else { | ||
// window.loadURL(formatUrl({ | ||
// pathname: path.join(__dirname, 'index.html'), | ||
// protocol: 'file', | ||
// slashes: true | ||
// })) | ||
// loadurl = formatUrl({ | ||
// pathname: path.join(__dirname, 'index.html'), | ||
// protocol: 'file', | ||
// slashes: true | ||
// })) | ||
// } | ||
console.log("loadurl=",loadurl); | ||
window.loadURL( loadurl ); | ||
@@ -37,0 +40,0 @@ window.on('closed', () => { |
{ | ||
"name": "electron-blink1-toy", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"lockfileVersion": 1, | ||
"requires": true, | ||
"dependencies": { | ||
"acorn": { | ||
"version": "5.7.4", | ||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", | ||
"integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" | ||
"@babel/runtime": { | ||
"version": "7.11.2", | ||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", | ||
"integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", | ||
"requires": { | ||
"regenerator-runtime": "^0.13.4" | ||
} | ||
}, | ||
"amdefine": { | ||
"version": "1.0.1", | ||
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", | ||
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" | ||
"@popperjs/core": { | ||
"version": "2.4.4", | ||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.4.4.tgz", | ||
"integrity": "sha512-1oO6+dN5kdIA3sKPZhRGJTfGVP4SWV6KqlMOwry4J3HfyD68sl/3KmG7DeYUzvN+RbhXDnv/D8vNNB8168tAMg==" | ||
}, | ||
"@restart/context": { | ||
"version": "2.1.4", | ||
"resolved": "https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz", | ||
"integrity": "sha512-INJYZQJP7g+IoDUh/475NlGiTeMfwTXUEr3tmRneckHIxNolGOW9CTq83S8cxq0CgJwwcMzMJFchxvlwe7Rk8Q==" | ||
}, | ||
"@restart/hooks": { | ||
"version": "0.3.25", | ||
"resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.3.25.tgz", | ||
"integrity": "sha512-m2v3N5pxTsIiSH74/sb1yW8D9RxkJidGW+5Mfwn/lHb2QzhZNlaU1su7abSyT9EGf0xS/0waLjrf7/XxQHUk7w==", | ||
"requires": { | ||
"lodash": "^4.17.15", | ||
"lodash-es": "^4.17.15" | ||
} | ||
}, | ||
"@types/classnames": { | ||
"version": "2.2.10", | ||
"resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.2.10.tgz", | ||
"integrity": "sha512-1UzDldn9GfYYEsWWnn/P4wkTlkZDH7lDb0wBMGbtIQc9zXEQq7FlKBdZUn6OBqD8sKZZ2RQO2mAjGpXiDGoRmQ==" | ||
}, | ||
"@types/invariant": { | ||
"version": "2.2.33", | ||
"resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.33.tgz", | ||
"integrity": "sha512-/jUNmS8d4bCKdqslfxW6dg/9Gksfzxz67IYfqApHn+HvHlMVXwYv2zpTDnS/yaK9BB0i0GlBTaYci0EFE62Hmw==" | ||
}, | ||
"@types/prop-types": { | ||
"version": "15.7.3", | ||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz", | ||
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" | ||
}, | ||
"@types/react": { | ||
"version": "16.9.46", | ||
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.46.tgz", | ||
"integrity": "sha512-dbHzO3aAq1lB3jRQuNpuZ/mnu+CdD3H0WVaaBQA8LTT3S33xhVBUj232T8M3tAhSWJs/D/UqORYUlJNl/8VQZg==", | ||
"requires": { | ||
"@types/prop-types": "*", | ||
"csstype": "^3.0.2" | ||
} | ||
}, | ||
"@types/react-transition-group": { | ||
"version": "4.4.0", | ||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz", | ||
"integrity": "sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w==", | ||
"requires": { | ||
"@types/react": "*" | ||
} | ||
}, | ||
"@types/warning": { | ||
"version": "3.0.0", | ||
"resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", | ||
"integrity": "sha1-DSUBJorY+ZYrdA04fEZU9fjiPlI=" | ||
}, | ||
"ansi-regex": { | ||
@@ -36,30 +90,2 @@ "version": "2.1.1", | ||
}, | ||
"asap": { | ||
"version": "2.0.6", | ||
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", | ||
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" | ||
}, | ||
"ast-types": { | ||
"version": "0.9.6", | ||
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", | ||
"integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=" | ||
}, | ||
"babel-runtime": { | ||
"version": "5.8.38", | ||
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", | ||
"integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=", | ||
"requires": { | ||
"core-js": "^1.0.0" | ||
} | ||
}, | ||
"balanced-match": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", | ||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" | ||
}, | ||
"base62": { | ||
"version": "1.2.8", | ||
"resolved": "https://registry.npmjs.org/base62/-/base62-1.2.8.tgz", | ||
"integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==" | ||
}, | ||
"base64-js": { | ||
@@ -101,15 +127,6 @@ "version": "1.3.1", | ||
"bootstrap": { | ||
"version": "3.4.1", | ||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", | ||
"integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==" | ||
"version": "4.5.2", | ||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.2.tgz", | ||
"integrity": "sha512-vlGn0bcySYl/iV+BGA544JkkZP5LB3jsmkeKLFQakCOwCM3AOk7VkldBz4jrzSe+Z0Ezn99NVXa1o45cQY4R6A==" | ||
}, | ||
"brace-expansion": { | ||
"version": "1.1.11", | ||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||
"requires": { | ||
"balanced-match": "^1.0.0", | ||
"concat-map": "0.0.1" | ||
} | ||
}, | ||
"buffer": { | ||
@@ -139,28 +156,2 @@ "version": "5.6.0", | ||
}, | ||
"commander": { | ||
"version": "2.20.3", | ||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", | ||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" | ||
}, | ||
"commoner": { | ||
"version": "0.10.8", | ||
"resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", | ||
"integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", | ||
"requires": { | ||
"commander": "^2.5.0", | ||
"detective": "^4.3.1", | ||
"glob": "^5.0.15", | ||
"graceful-fs": "^4.1.2", | ||
"iconv-lite": "^0.4.5", | ||
"mkdirp": "^0.5.0", | ||
"private": "^0.1.6", | ||
"q": "^1.1.2", | ||
"recast": "^0.11.17" | ||
} | ||
}, | ||
"concat-map": { | ||
"version": "0.0.1", | ||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", | ||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" | ||
}, | ||
"console-control-strings": { | ||
@@ -171,7 +162,2 @@ "version": "1.1.0", | ||
}, | ||
"core-js": { | ||
"version": "1.2.7", | ||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", | ||
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" | ||
}, | ||
"core-util-is": { | ||
@@ -182,2 +168,7 @@ "version": "1.0.2", | ||
}, | ||
"csstype": { | ||
"version": "3.0.2", | ||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.2.tgz", | ||
"integrity": "sha512-ofovWglpqoqbfLNOTBNZLSbMuGrblAf1efvvArGKOZMBrIoJeu5UsAipQolkijtyQx5MtAzT/J9IHj/CEY1mJw==" | ||
}, | ||
"decompress-response": { | ||
@@ -196,7 +187,2 @@ "version": "4.2.1", | ||
}, | ||
"defined": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", | ||
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" | ||
}, | ||
"delegates": { | ||
@@ -212,16 +198,11 @@ "version": "1.0.0", | ||
}, | ||
"detective": { | ||
"version": "4.7.1", | ||
"resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", | ||
"integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", | ||
"dom-helpers": { | ||
"version": "5.2.0", | ||
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz", | ||
"integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==", | ||
"requires": { | ||
"acorn": "^5.2.1", | ||
"defined": "^1.0.0" | ||
"@babel/runtime": "^7.8.7", | ||
"csstype": "^3.0.2" | ||
} | ||
}, | ||
"dom-helpers": { | ||
"version": "2.4.0", | ||
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-2.4.0.tgz", | ||
"integrity": "sha1-m7SyRfY3NnsfpnAnQnKqKP4Gw2c=" | ||
}, | ||
"end-of-stream": { | ||
@@ -235,16 +216,2 @@ "version": "1.4.4", | ||
}, | ||
"envify": { | ||
"version": "3.4.1", | ||
"resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", | ||
"integrity": "sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg=", | ||
"requires": { | ||
"jstransform": "^11.0.3", | ||
"through": "~2.3.4" | ||
} | ||
}, | ||
"esprima-fb": { | ||
"version": "15001.1.0-dev-harmony-fb", | ||
"resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", | ||
"integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=" | ||
}, | ||
"expand-template": { | ||
@@ -255,14 +222,2 @@ "version": "2.0.3", | ||
}, | ||
"fbjs": { | ||
"version": "0.6.1", | ||
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.6.1.tgz", | ||
"integrity": "sha1-lja3cF9bqWhNRLcveDISVK/IYPc=", | ||
"requires": { | ||
"core-js": "^1.0.0", | ||
"loose-envify": "^1.0.0", | ||
"promise": "^7.0.3", | ||
"ua-parser-js": "^0.7.9", | ||
"whatwg-fetch": "^0.9.0" | ||
} | ||
}, | ||
"file-uri-to-path": { | ||
@@ -298,19 +253,2 @@ "version": "1.0.0", | ||
}, | ||
"glob": { | ||
"version": "5.0.15", | ||
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", | ||
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", | ||
"requires": { | ||
"inflight": "^1.0.4", | ||
"inherits": "2", | ||
"minimatch": "2 || 3", | ||
"once": "^1.3.0", | ||
"path-is-absolute": "^1.0.0" | ||
} | ||
}, | ||
"graceful-fs": { | ||
"version": "4.2.4", | ||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", | ||
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" | ||
}, | ||
"has-unicode": { | ||
@@ -321,10 +259,2 @@ "version": "2.0.1", | ||
}, | ||
"iconv-lite": { | ||
"version": "0.4.24", | ||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", | ||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", | ||
"requires": { | ||
"safer-buffer": ">= 2.1.2 < 3" | ||
} | ||
}, | ||
"ieee754": { | ||
@@ -335,11 +265,2 @@ "version": "1.1.13", | ||
}, | ||
"inflight": { | ||
"version": "1.0.6", | ||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", | ||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", | ||
"requires": { | ||
"once": "^1.3.0", | ||
"wrappy": "1" | ||
} | ||
}, | ||
"inherits": { | ||
@@ -381,31 +302,12 @@ "version": "2.0.4", | ||
}, | ||
"jstransform": { | ||
"version": "11.0.3", | ||
"resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", | ||
"integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", | ||
"requires": { | ||
"base62": "^1.1.0", | ||
"commoner": "^0.10.1", | ||
"esprima-fb": "^15001.1.0-dev-harmony-fb", | ||
"object-assign": "^2.0.0", | ||
"source-map": "^0.4.2" | ||
}, | ||
"dependencies": { | ||
"object-assign": { | ||
"version": "2.1.1", | ||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", | ||
"integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" | ||
} | ||
} | ||
"lodash": { | ||
"version": "4.17.20", | ||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", | ||
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" | ||
}, | ||
"keycode": { | ||
"version": "2.2.0", | ||
"resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz", | ||
"integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=" | ||
"lodash-es": { | ||
"version": "4.17.15", | ||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", | ||
"integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" | ||
}, | ||
"lodash-compat": { | ||
"version": "3.10.2", | ||
"resolved": "https://registry.npmjs.org/lodash-compat/-/lodash-compat-3.10.2.tgz", | ||
"integrity": "sha1-xpQBKKnTD46QLNLPmf0Muk7PwYM=" | ||
}, | ||
"loose-envify": { | ||
@@ -424,10 +326,2 @@ "version": "1.4.0", | ||
}, | ||
"minimatch": { | ||
"version": "3.0.4", | ||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", | ||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", | ||
"requires": { | ||
"brace-expansion": "^1.1.7" | ||
} | ||
}, | ||
"minimist": { | ||
@@ -522,7 +416,2 @@ "version": "1.2.5", | ||
}, | ||
"path-is-absolute": { | ||
"version": "1.0.1", | ||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", | ||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" | ||
}, | ||
"prebuild-install": { | ||
@@ -550,7 +439,2 @@ "version": "5.3.5", | ||
}, | ||
"private": { | ||
"version": "0.1.8", | ||
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", | ||
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" | ||
}, | ||
"process-nextick-args": { | ||
@@ -561,10 +445,21 @@ "version": "2.0.1", | ||
}, | ||
"promise": { | ||
"version": "7.3.1", | ||
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", | ||
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", | ||
"prop-types": { | ||
"version": "15.7.2", | ||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", | ||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", | ||
"requires": { | ||
"asap": "~2.0.3" | ||
"loose-envify": "^1.4.0", | ||
"object-assign": "^4.1.1", | ||
"react-is": "^16.8.1" | ||
} | ||
}, | ||
"prop-types-extra": { | ||
"version": "1.1.1", | ||
"resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz", | ||
"integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==", | ||
"requires": { | ||
"react-is": "^16.3.2", | ||
"warning": "^4.0.0" | ||
} | ||
}, | ||
"pump": { | ||
@@ -579,7 +474,2 @@ "version": "3.0.0", | ||
}, | ||
"q": { | ||
"version": "1.5.1", | ||
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", | ||
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" | ||
}, | ||
"rc": { | ||
@@ -597,58 +487,81 @@ "version": "1.2.8", | ||
"react": { | ||
"version": "0.14.9", | ||
"resolved": "https://registry.npmjs.org/react/-/react-0.14.9.tgz", | ||
"integrity": "sha1-kRCmSXxJ1EuhwO3TF67CnC4NkdE=", | ||
"version": "16.13.1", | ||
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", | ||
"integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", | ||
"requires": { | ||
"envify": "^3.0.0", | ||
"fbjs": "^0.6.1" | ||
"loose-envify": "^1.1.0", | ||
"object-assign": "^4.1.1", | ||
"prop-types": "^15.6.2" | ||
} | ||
}, | ||
"react-bootstrap": { | ||
"version": "0.27.3", | ||
"resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-0.27.3.tgz", | ||
"integrity": "sha1-VTXu4Qc2KNkfM0QMxx9/5z999p0=", | ||
"version": "1.3.0", | ||
"resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-1.3.0.tgz", | ||
"integrity": "sha512-GYj0c6FO9mx7DaO8Xyz2zs0IcQ6CGCtM3O6/feIoCaG4N8B0+l4eqL7stlMcLpqO4d8NG2PoMO/AbUOD+MO7mg==", | ||
"requires": { | ||
"babel-runtime": "^5.8.25", | ||
"classnames": "^2.1.5", | ||
"dom-helpers": "^2.4.0", | ||
"keycode": "^2.1.0", | ||
"lodash-compat": "^3.10.1", | ||
"react-overlays": "^0.5.0", | ||
"react-prop-types": "^0.3.0", | ||
"uncontrollable": "^3.1.3", | ||
"warning": "^2.1.0" | ||
"@babel/runtime": "^7.4.2", | ||
"@restart/context": "^2.1.4", | ||
"@restart/hooks": "^0.3.21", | ||
"@types/classnames": "^2.2.10", | ||
"@types/invariant": "^2.2.33", | ||
"@types/prop-types": "^15.7.3", | ||
"@types/react": "^16.9.35", | ||
"@types/react-transition-group": "^4.4.0", | ||
"@types/warning": "^3.0.0", | ||
"classnames": "^2.2.6", | ||
"dom-helpers": "^5.1.2", | ||
"invariant": "^2.2.4", | ||
"prop-types": "^15.7.2", | ||
"prop-types-extra": "^1.1.0", | ||
"react-overlays": "^4.1.0", | ||
"react-transition-group": "^4.4.1", | ||
"uncontrollable": "^7.0.0", | ||
"warning": "^4.0.3" | ||
} | ||
}, | ||
"react-dom": { | ||
"version": "0.14.9", | ||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.14.9.tgz", | ||
"integrity": "sha1-BQZKPc8PsYgKOyv8nVjFXY2fYpM=" | ||
"version": "16.13.1", | ||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", | ||
"integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", | ||
"requires": { | ||
"loose-envify": "^1.1.0", | ||
"object-assign": "^4.1.1", | ||
"prop-types": "^15.6.2", | ||
"scheduler": "^0.19.1" | ||
} | ||
}, | ||
"react-is": { | ||
"version": "16.13.1", | ||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", | ||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" | ||
}, | ||
"react-lifecycles-compat": { | ||
"version": "3.0.4", | ||
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", | ||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" | ||
}, | ||
"react-overlays": { | ||
"version": "0.5.4", | ||
"resolved": "https://registry.npmjs.org/react-overlays/-/react-overlays-0.5.4.tgz", | ||
"integrity": "sha1-9dcqmhlj6R51m4NOkdNQAk37ytA=", | ||
"version": "4.1.0", | ||
"resolved": "https://registry.npmjs.org/react-overlays/-/react-overlays-4.1.0.tgz", | ||
"integrity": "sha512-vdRpnKe0ckWOOD9uWdqykLUPHLPndIiUV7XfEKsi5008xiyHCfL8bxsx4LbMrfnxW1LzRthLyfy50XYRFNQqqw==", | ||
"requires": { | ||
"classnames": "^2.1.3", | ||
"dom-helpers": "^2.3.0", | ||
"react-prop-types": "^0.2.1", | ||
"warning": "^2.1.0" | ||
}, | ||
"dependencies": { | ||
"react-prop-types": { | ||
"version": "0.2.2", | ||
"resolved": "https://registry.npmjs.org/react-prop-types/-/react-prop-types-0.2.2.tgz", | ||
"integrity": "sha1-rkmRTUlSOCET0OIQsuUQFvC9fxk=", | ||
"requires": { | ||
"warning": "^2.0.0" | ||
} | ||
} | ||
"@babel/runtime": "^7.4.5", | ||
"@popperjs/core": "^2.0.0", | ||
"@restart/hooks": "^0.3.12", | ||
"@types/warning": "^3.0.0", | ||
"dom-helpers": "^5.1.0", | ||
"prop-types": "^15.7.2", | ||
"uncontrollable": "^7.0.0", | ||
"warning": "^4.0.3" | ||
} | ||
}, | ||
"react-prop-types": { | ||
"version": "0.3.2", | ||
"resolved": "https://registry.npmjs.org/react-prop-types/-/react-prop-types-0.3.2.tgz", | ||
"integrity": "sha1-4nY6xvOoAZnYmBw2R8RLBVTJe38=", | ||
"react-transition-group": { | ||
"version": "4.4.1", | ||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz", | ||
"integrity": "sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw==", | ||
"requires": { | ||
"warning": "^2.0.0" | ||
"@babel/runtime": "^7.5.5", | ||
"dom-helpers": "^5.0.1", | ||
"loose-envify": "^1.4.0", | ||
"prop-types": "^15.6.2" | ||
} | ||
@@ -670,24 +583,6 @@ }, | ||
}, | ||
"recast": { | ||
"version": "0.11.23", | ||
"resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", | ||
"integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", | ||
"requires": { | ||
"ast-types": "0.9.6", | ||
"esprima": "~3.1.0", | ||
"private": "~0.1.5", | ||
"source-map": "~0.5.0" | ||
}, | ||
"dependencies": { | ||
"esprima": { | ||
"version": "3.1.3", | ||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", | ||
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" | ||
}, | ||
"source-map": { | ||
"version": "0.5.7", | ||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", | ||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" | ||
} | ||
} | ||
"regenerator-runtime": { | ||
"version": "0.13.7", | ||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", | ||
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" | ||
}, | ||
@@ -699,6 +594,10 @@ "safe-buffer": { | ||
}, | ||
"safer-buffer": { | ||
"version": "2.1.2", | ||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", | ||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" | ||
"scheduler": { | ||
"version": "0.19.1", | ||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", | ||
"integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", | ||
"requires": { | ||
"loose-envify": "^1.1.0", | ||
"object-assign": "^4.1.1" | ||
} | ||
}, | ||
@@ -735,10 +634,2 @@ "semver": { | ||
}, | ||
"source-map": { | ||
"version": "0.4.4", | ||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", | ||
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", | ||
"requires": { | ||
"amdefine": ">=0.0.4" | ||
} | ||
}, | ||
"string-width": { | ||
@@ -810,7 +701,2 @@ "version": "1.0.2", | ||
}, | ||
"through": { | ||
"version": "2.3.8", | ||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", | ||
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" | ||
}, | ||
"tinycolor2": { | ||
@@ -829,13 +715,11 @@ "version": "1.4.1", | ||
}, | ||
"ua-parser-js": { | ||
"version": "0.7.21", | ||
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", | ||
"integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==" | ||
}, | ||
"uncontrollable": { | ||
"version": "3.3.1", | ||
"resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-3.3.1.tgz", | ||
"integrity": "sha1-4jtALnpMabGFP7S0PONLZIDGW28=", | ||
"version": "7.1.1", | ||
"resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.1.1.tgz", | ||
"integrity": "sha512-EcPYhot3uWTS3w00R32R2+vS8Vr53tttrvMj/yA1uYRhf8hbTG2GyugGqWDY0qIskxn0uTTojVd6wPYW9ZEf8Q==", | ||
"requires": { | ||
"invariant": "^2.1.0" | ||
"@babel/runtime": "^7.6.3", | ||
"@types/react": "^16.9.11", | ||
"invariant": "^2.2.4", | ||
"react-lifecycles-compat": "^3.0.4" | ||
} | ||
@@ -849,5 +733,5 @@ }, | ||
"warning": { | ||
"version": "2.1.0", | ||
"resolved": "https://registry.npmjs.org/warning/-/warning-2.1.0.tgz", | ||
"integrity": "sha1-ISINnGOvx3qMkhEeARr3Bc4MaQE=", | ||
"version": "4.0.3", | ||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", | ||
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", | ||
"requires": { | ||
@@ -857,7 +741,2 @@ "loose-envify": "^1.0.0" | ||
}, | ||
"whatwg-fetch": { | ||
"version": "0.9.0", | ||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz", | ||
"integrity": "sha1-DjaExsuZlbQ+/J3wPkw2XZX9nMA=" | ||
}, | ||
"which-pm-runs": { | ||
@@ -864,0 +743,0 @@ "version": "1.0.0", |
{ | ||
"name": "electron-blink1-toy", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Play with Electron and node-blink1", | ||
@@ -10,9 +10,9 @@ "main": "main.js", | ||
"dependencies": { | ||
"bootstrap": "^3.3.7", | ||
"bootstrap": "^4.5.2", | ||
"node-blink1": "^0.4.0", | ||
"react": "^0.14.2", | ||
"react-bootstrap": "^0.27.3", | ||
"react-dom": "^0.14.2", | ||
"react": "^16.13.1", | ||
"react-bootstrap": "^1.3.0", | ||
"react-dom": "^16.13.1", | ||
"tinycolor2": "^1.3.0" | ||
} | ||
} |
{ | ||
"name": "electron-blink1-toy", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Play with Electron and node-blink1", | ||
@@ -13,3 +13,3 @@ "repository": "todbot/electron-blink1-toy", | ||
"dist": "electron-builder", | ||
"dist:dir": "npm run dist --dir", | ||
"dist:dir": "electron-builder --dir", | ||
"postinstall": "electron-builder install-app-deps", | ||
@@ -29,9 +29,11 @@ "clean": "rimraf node_modules app/node_modules app/build dist" | ||
"appId": "org.thingm.electron-blink1-toy", | ||
"afterSign": "./pkg/afterSign.js", | ||
"npmRebuild": true, | ||
"mac": { | ||
"entitlements": "./pkg/entitlements.mac.inherit.plist", | ||
"entitlementsInherit": "./pkg/entitlements.mac.inherit.plist", | ||
"target": "zip", | ||
"category": "public.app-category.utilities", | ||
"gatekeeperAssess": false, | ||
"hardenedRuntime": true, | ||
"target": "zip" | ||
"entitlements": "./pkg/entitlements.mac.inherit.plist", | ||
"entitlementsInherit": "./pkg/entitlements.mac.inherit.plist" | ||
}, | ||
@@ -49,4 +51,5 @@ "win": { | ||
"cross-env": "^7.0.2", | ||
"electron": "^8.3.4", | ||
"electron-builder": "^22.7.0", | ||
"electron": "^9.0.5", | ||
"electron-builder": "^22.8.0", | ||
"electron-notarize": "^1.0.0", | ||
"html-webpack-plugin": "^4.3.0", | ||
@@ -53,0 +56,0 @@ "webpack": "^4.43.0", |
@@ -12,3 +12,3 @@ # electron-blink1-toy | ||
npm install | ||
npm run webpack | ||
npm run pack | ||
npm run start | ||
@@ -20,3 +20,3 @@ ``` | ||
npm install | ||
npm run webpack | ||
npm run pack | ||
npm run dist | ||
@@ -23,0 +23,0 @@ ``` |
@@ -30,15 +30,8 @@ const webpack = require('webpack'); | ||
}, | ||
// resolve: { | ||
// extensions: ['*', '.js', '.jsx'] | ||
// }, | ||
plugins: [ | ||
//new webpack.HotModuleReplacementPlugin(), | ||
// Re-generate index.html with injected script tag. | ||
// The injected script tag contains a src value of the | ||
// filename output defined above. | ||
// new HtmlWebpackPlugin(), | ||
// The injected script tag contains a src= output filename defined above | ||
new HtmlWebpackPlugin({ | ||
inject: true, | ||
//template: resolveAppPath('index.html'), | ||
template: path.resolve(__dirname, 'app/index.html') | ||
template: path.resolve(__dirname, 'app/index.html') | ||
}), | ||
@@ -54,8 +47,2 @@ ], | ||
// if( process.env.NODE_ENV === 'development' ) { | ||
// config.output.publicPath = 'http://localhost:8082/build/'; | ||
// } else { | ||
// config.output.publicPath= './build/'; | ||
// } | ||
module.exports = config; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13
0
126628
12
971
6