This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const program = require('commander') | |
const glob = require('glob') | |
const path = require('path') | |
const jsonfile = require('jsonfile') | |
const sizeOf = require('image-size') | |
program | |
.version("1.0.0") | |
.arguments('<manifest> <dir>') | |
.action(writeFilesDimensions) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// render method of the react component | |
render() { | |
if (this.state.clientSideJsAvailable) { | |
// Executed client side, this.state.clientSideJsAvailable is set in componentDidMount. | |
// return a div, gmap behaviour is plugged and refreshed in componentDidUpdate | |
return <div id="map"></div>; | |
} else { | |
// Executed server side |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
window.onkeydown = function(evt) { | |
if (evt.keyCode == 68) { | |
document.getElementById('demo').className = 'demo debug'; | |
} | |
}; | |
window.onkeyup = function(evt) { | |
if (evt.keyCode == 68) { | |
document.getElementById('demo').className = 'demo'; |