Created
July 4, 2018 19:26
-
-
Save cblgh/0818e31b633b8ae82ca20ebc08bb9456 to your computer and use it in GitHub Desktop.
testing neat-log's re-rendering on resize
This file contains 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
var neatLog = require('..') | |
var output = require("diffy/trim") | |
var log = neatLog(headerView, {fullscreen: true}) | |
log.render() // force an immediate render | |
function headerView (state) { | |
return output(` | |
Hello World! | |
rows ${process.stdout.rows} | |
columns ${process.stdout.columns} | |
${Array(process.stdout.rows - 4).fill("#").join("\n")} | |
`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or even simpler:
try resizing past a certain height and it breaks rerendering