Skip to content

Question: Any option to output to STDOUT #392

@t9md

Description

@t9md

I'm trying my Atom-editor plugin support "write js compiled output to another editor" so that I can learn OCaml itself and how buclescript compile to JavaScript.

To do this, the best I want is write bsc's output to STDOUT.
Is this supported?
Trying to -o option with -o - not work. even normal -o hoo.js seem to not work.
Next question, can I suppress output of .cmj and .cmi file? I just need js output only for my editor package.

I'm just start learning OCaml itself, so sorry if my question seems stupid, btw I could successfully get output of bsc.

$ ls
my_prog.ml
$ cat my_prog.ml
let () = print_endline "Hello, World!"
$ bsc -I . my_prog.ml
$ ls
my_prog.cmi my_prog.cmj my_prog.js  my_prog.ml
$ node my_prog.js
Hello, World!
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions