Open rrthomas opened 8 years ago
You can use the -d
or --prelude
flag when starting the REPL - this is documented with lsc --help
Thanks for responding. Sorry, I wasn't clear: I was talking about running scripts, not using the REPL.
I found -d
quickly, but of course it doesn't work with scripts (as far as I could tell from searching, it used to, but now only works with the REPL, which I also found puzzling).
Huh, I always just do:
global <<< require \prelude-ls
@naturalethic, exactly! If that were documented obviously and explicitly (rather than having to piece together the fact the -d
doesn't work for scripts, that the prelude isn't automatically included in LiveScript, and the syntax you mention above), that would be a great help for those new to Prelude & LiveScript.
I just had a play with LiveScript to show someone learning JavaScript how much more elegantly they could be coding!
It's great, but one thing frustrated me immensely: it took me about half an hour to work out the above incantation to import the entire prelude.
Given that it's so powerful (arguably a large part of the reason to use LiveScript in the first place), could you please foreground the above in the documentation, so users can start playing with LiveScript and its awesome prelude on their own machines as easily as they can in the online web sandbox?