Questions tagged [bsb]

BSB is the BuckleScript Build system; use with the [bucklescript] tag for compiler-errors, tooling, and setup problems.

bsb is the build-system for BuckleScript, the OCaml and ReasonML compiler that targets JavaScript- and npm-based projects.

5 questions
3
votes
1 answer

Inheriting Nextjs App component (pages/_app.js) in ReasonReact

I'm trying to implement the React Context API in my Nextjs app using ReasonReact but getting caught out by the bucklescript compiler's way of inferring module names. To make the context available to the whole tree I need to inherit from the Nextjs…
Julian Suggate
  • 627
  • 1
  • 6
  • 14
3
votes
1 answer

How does one compile a file with an interface, in BuckleScript?

Without bsb, how does one compile any more than a single unqualified .ml file? $ touch test.ml $ touch test.mli $ bsc test.ml File "test.ml", line 1: Error: Could not find the .cmi file for interface test.mli. I haven't even gotten as far as trying…
ELLIOTTCABLE
  • 17,185
  • 12
  • 62
  • 78
1
vote
1 answer

Can I use OCaml regular expressions from BuckleScript? (Str.search_forward in particular)

I am porting an OCaml project to ReasonML, but first to BuckleScript. I seeded the project directory with bsb init . and copied over the *.ml files. Compiling with npm run build gives me error: [1/6] Building src/demo.cmj File…
user3603546
  • 325
  • 2
  • 11
0
votes
1 answer

How to use a reason module from local package

I’m looking for a way to use a local package (named bs-package) from my Reason React app (named ApplicationA). bs-package has a single file within src folder called ModuleA.re : let greet_me = (me) => Js.log("Hello, " ++ me ++ "!"); In ApplicationA…
Yvain
  • 882
  • 1
  • 10
  • 27
0
votes
0 answers

Can't create reasonML project on Windows

I just started learning reasonML and I want to create my first project. I installed bs-platform globally with npm install -g bs-platform. I want to create the first project with the command bsb -init my-new-project -theme basic-reason but…
bonheury
  • 362
  • 1
  • 5
  • 14