node_of_ocaml

An OCaml ppx to require node modules
README

This is a simple OCaml ppx rewriter to use node modules in OCaml.

Install

opam install node_of_ocaml

Usage

In your dune file:

(executable
  (name <exe_name>)
  (modes js)
  (preprocess (pps node_of_ocaml)))

If you wish to use a node module, just use this:

let uniq = [%require uniq]

To use the compiled file in your browser you cin use your favorite JavScript bundler.

Install
Published
23 May 2021
Maintainers
Sources
1.0.0.tar.gz
md5=31e966a5e495d7f5a76d65d0bed65d49
sha512=91bd1184132a497491db55b460da27f8fa7301aabe8c2034ab404e2f15d6baa821bcfe4c4bb14e972602a907f24d57075de2fd80807c45ec16e97402022a5a24
Dependencies
odoc
with-doc
ppxlib
>= "0.6.0"
dune
>= "2.8"
Reverse Dependencies