visitor-flutter
visitor-flutter copied to clipboard
replace file reading with file execution!
this is a cosmetic PR really. I think you can trim these lines. You might need then to make those files executable and put a #! /usr/bin/env node
at the top of the files
Thanks for dipping your toes in! :) Initially I did pass strings to eval directly from env but it felt way to weird. Looking at it again zoomed out more, I guess it could even be a module and export before
and after
functions.
Finally got around to trying this, on go-ssb-room though, where I took the chance to start with a cleaner slate.
I chose to require the scripts (expecting a from of two exported functions) and pass the helpers that were in scope of the eval. The error messages alone make this worth while, not being clouded in somewhere in the eval. Just not sure when I get around to porting the test corpus here but it should definitely happen.
Not sure on the state of this folks, should it be merged or adapted? @mixmix @cryptix
Unsure of status (https://github.com/ssbc/go-ssb/pull/20#issuecomment-1192563174), unsure folks are coming back to this one. Will close off for now.