tonylukasavage / triple

REPL for Titanium
MIT License
96 stars 21 forks source link

.load from file #23

Closed tonylukasavage closed 10 years ago

tonylukasavage commented 10 years ago

load would sequentially load each line of a Javascript file into the REPL. Given this code:

var win = Ti.UI.createWindow();
win.open();
win.backgroundColor = '#fff';

You should be able to do and generate this:

$ triple
> .load sample.js
> var win = Ti.UI.createWindow();
undefined
> win.open();
undefined
> win.backgroundColor = '#fff';
'#fff'
>

Allowing all of the commands to be accessible via the history.