package node_of_ocaml

  1. Overview
  2. Docs
On This Page
  1. Install
  2. Usage
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

node_of_ocaml

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.

OCaml

Innovation. Community. Security.