3 ms·
The obvious reason would be that to make it work nicely as a compiler, they wanted to make it pull in files and compile them. It shouldn't be terribly difficult
by mistercow 14y ago
The obvious reason would be that to make it work nicely as a compiler, they wanted to make it pull in files and compile them. It shouldn't be terribly difficult, though, to patch it and make it compile in-browser like CoffeeScript does with special script tags.
- stevelosh 14y agoAccording to the docs it's pretty close to that already: http://lispyscript.com/docs/#browser http://lispyscript.com/docs/#browser You'd just need to make it find the special script tags and eval them. EDIT: Yeah actually it's already in there: https://github.com/santoshrajan/lispyscript/blob/master/src/browser.ls#L34 https://github.com/santoshrajan/lispyscript/blob/master/src/...
- mistercow 14y agoActually, it turns out it's already implemented: https://github.com/santoshrajan/lispyscript/blob/da6602126eb0707c886c88f6ef6627f7c3882dec/src/browser.ls https://github.com/santoshrajan/lispyscript/blob/da6602126eb... So any script with type "application/lispyscript" will automatically be parsed and run. The only requirements appear to be RequireJS and underscore.