LiveScript icon indicating copy to clipboard operation
LiveScript copied to clipboard

lsc-pattern: "[file] --nodejs --harmony-proxies" doesn't work

Open omelhoro opened this issue 11 years ago • 5 comments

I'm using the 1.4 command line lsc

A command like:

lsc index.ls --nodejs --harmony-proxies

isn't passed to nodejs. I've debugged it a little and it seems the optionator simply doesn't recognize --nodejs and won't start node in line 35 of https://github.com/gkz/LiveScript/blob/master/src/command.ls.

What seems to work as a workaround is something like that:

o.nodejs = o._.indexOf('--nodejs') > -1 in Line 33

omelhoro avatar Oct 03 '15 17:10 omelhoro

Uh... I cannot replicate this?

$ bin/lsc
LiveScript 1.4.0 - use 'lsc --help' for more information
ls> Proxy
Proxy
[ReferenceError: Proxy is not defined]
ls>

$ bin/lsc --nodejs --harmony-proxies
LiveScript 1.4.0 - use 'lsc --help' for more information
ls> Proxy
Proxy
Object {}
ls>

summivox avatar Feb 01 '16 16:02 summivox

Can confirm, maybe you nodejs version is too old. (I'm not running master, but 1.4.0) (I'll reopen if you have more informations)

vendethiel avatar Feb 01 '16 16:02 vendethiel

Can you create a file index.ls with the following content:

Proxy

and start it using: lsc index.ls --nodejs --harmony-proxies

For me there is an error `Reference Error: Proxy is not defined'

Like I said, the problem appears only when I try to start a file, but not when I start a simple repl.

I'm on Node 5.0.0

omelhoro avatar Feb 01 '16 16:02 omelhoro

If you pass any argument after the filename, then it's an argument for the program, not for lsc. sorry I read your original issue too fast.

vendethiel avatar Feb 01 '16 16:02 vendethiel

You're right :) lsc --nodejs --harmony-proxies index.ls works :D

omelhoro avatar Feb 01 '16 16:02 omelhoro