0.0.4 • Published 7 years ago
editable-cli v0.0.4
editable-cli
Command line notebooks powered by observablehq
Local notebooks written in pure javascript, with the same live-relaod functionality as Observable!

Install editable-cli, (npm install -g editable-cli) create new file editable-test.js and run editable-cli ./editable-test.js.
Create few cells using def global function (try saving the file between each edit to see live updates):
def("a", 10)- defines cellato equal to10def("b", 20)- defined cellbto equal to20def("sum", (a, b) => a + b)- definessumto be sum ofaandb, changing either of those cells will result in updatedsumvalue
Currently edited file is watched for changes, and frontend automatically refreshes (without full-page reloads) while keeping the cell state intact (unless that cell was changed).
More examples in examples directory.
Named by Peter van Hardenberg.
Why?
I like the idea of notebooks, but I also really like my text editor.
editable-cli allows me to have both.
It was also fun getting to know observable/notebook-runtime.
Installation
npm install -g editable-cliRunning
editable-cli ./file.js- open URL logged to console