Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
pkg
src
README.md
package-lock.json
package.json
tsconfig.json

README.md

@pika/plugin-source-bucklescript

A @pika/pack build plugin. Builds ES2018 JavaScript from ReasonML or OCaml via BuckleScript.

Install

# npm:
npm install @pika/plugin-source-bucklescript --save-dev
# yarn:
yarn add @pika/plugin-source-bucklescript --dev

Usage

{
  "name": "example-package-json",
  "version": "1.0.0",
  "@pika/pack": {
    "pipeline": [
      ["@pika/plugin-source-bucklescript"],
      ["@pika/plugin-build-node"],
      ["@pika/plugin-build-web"],
      ["@pika/plugin-build-types"]
    ]
  }
}

For more information about @pika/pack & help getting started, check out the main project repo.

Result

Unlike other build plugins, this plugin reads directly from your package src/ directory. Make sure your code exists in a src/ directory, with an src/index.ml or src/index.re file acting as your package entrypoint.

Other build plugins will depend on the resulting distribution, so include this plugin early in your build pipeline for others to use.

  1. Adds a modern ES2018 distribution to your built package: dist-src/
  2. Adds an "esnext" entrypoint to your built package.json manifest.