sscaff1 / bs-node-readline

Node readline bindings for BuckleScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing into project

bjrnt opened this issue · comments

Hello,

I tried following the instructions in the readme but that did not let me import the library as in the example. Instead, I had to prefix every usage with BsReadline as in BsReadline.Readline.createInterface(...) to get the imports and compilation to work.

Not sure if this is intended or if I have misconfigured something, but I thought it worth reporting.

Dont know if that was intended either. You can do this if you want to just call Readline:

  "bsc-flags": ["-open BsReadline"],

Among other things, obviously, like module Readline = BsReadline.Readline at the top of your file.

First solution seemed to cause problems here and there.

I went with this:

// Readline.re
include BsReadline.Readline;

The open Readline; in the file were I used it.

I'm happy to accept a PR.