A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
| dialog { | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| right: auto; | |
| padding: 30px; | |
| transform: perspective(500px) translate(-50%, -50%); | |
| background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF; | |
| border: none; | |
| border-radius: 3px; |
| { | |
| "window.zoomLevel": 0, | |
| "editor.fontFamily": "'Source Code Pro', Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 12, | |
| "editor.insertSpaces": false, | |
| "editor.minimap.enabled": false, | |
| "editor.quickSuggestionsDelay": 100, | |
| "editor.multiCursorModifier": "ctrlCmd", | |
| "editor.formatOnPaste": false, | |
| "editor.suggestFontSize": 11, |
| node_modules | |
| npm-debug.log | |
| dist | |
| build |
A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
| var path = require('path').join(__dirname, '..', 'package.json'); | |
| var pkg = require(path); | |
| ['babel', 'greenkeeper', 'bundlesize', 'devDependencies', 'eslintConfig'].forEach(function(key) { delete pkg[key] }); | |
| pkg.scripts = { postinstall: pkg.scripts.postinstall, donate: pkg.scripts.donate }; | |
| require('fs').writeFileSync(path, JSON.stringify(pkg, null, 2)); |
A Preact PWA port of Eric Bidelman's Lighthouse Viewer app. Zero-config PWA build powered by preact-cli.
Try it out: lighthouse-viewer.surge.sh.
| { | |
| "rewrites": [ | |
| { | |
| "source": "**", | |
| "destination": "/index.html" | |
| } | |
| ], | |
| "headers": [ | |
| { | |
| "source": "**", |
| <script src="/path/to/embed.umd.js"></script> | |
| <div id="foo"></div> | |
| <script> | |
| var parent = document.getElementById('foo') | |
| embed.renderWidget( | |
| 'foo', // widget name | |
| { a: 'b' }, // props | |
| parent // render into this | |
| ); |