bucklescript
BuckleScript configuration file
| Type | object |
|---|---|
| File match |
bsconfig.json
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/bucklescript/latest.json |
| Source | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json |
Validate with Lintel
npx @lintel/lintel check
All paths are required to be in Unix format (foo/bar), the build system normalizes them for other platforms internally
Properties
Package name
Example: "src" or ["src", "test"] or [{"dir": "src", "subdirs": [...]}]
The semantic version of the ReScript library
a list of directories that the build system will not look into
(WIP) Pre defined rules
Ignore generators, cut the dependency on generator tools
3 nested properties
Whether to apply the specific version of JSX PPX transformation
JSX module. Either "react" for React, or (since v11.1) any valid module name to apply a generic JSX transform.
Whether to preserve the JSX in the output. Requires version to be set.
Configuration for the uncurried mode.
path to gentype, path resolution is similar to ReScript
1 nested properties
warning numbers and whether to turn it into error or not
2 nested properties
Default: "+a-4-9-20-41-50-102". Go here for the meanings of the warning flags
1 nested properties
Shell command to run after each JS file is compiled. The absolute path to the output JS file is appended as an argument. The path respects the in-source setting. The command runs in the directory containing the rescript.json where it is defined.
(Not needed usually) external include directories, which will be applied -I to all compilation units
Suffix of generated js files. Default: .js. May contain letters, digits, "-", "_" and "." and must end with .js, .mjs or .cjs.
4 nested properties
The types of analysis to activate. dce means dead code analysis, exception means exception analysis, and termination is to check for infinite loops.
Paths for any folders you'd like to exclude from analysis. Useful for bindings and similar. Example: ["src/bindings"].
Any specific paths inside suppressed folders that you want to unsuppress. Example: ["src/bindings/SomeBinding.res"].
specify whether transitively dead items should be reported (default: false)
1 nested properties
A mapping to extend the autocompletion for a given type with an array of modules. E.g. { "int": ["IntUtils", "IntExt"] } will extend the autocompletion of the int type with the values from IntUtils and IntExt modules.
Enable experimental compiler features.
1 nested properties
Enable let? syntax.
Definitions
Output module format. Default: esmodule.
Suffix of generated js files. Default: .js. May contain letters, digits, "-", "_" and "." and must end with .js, .mjs or .cjs.
The types of analysis to activate. dce means dead code analysis, exception means exception analysis, and termination is to check for infinite loops.
Paths for any folders you'd like to exclude from analysis. Useful for bindings and similar. Example: ["src/bindings"].
Any specific paths inside suppressed folders that you want to unsuppress. Example: ["src/bindings/SomeBinding.res"].
specify whether transitively dead items should be reported (default: false)
Shell command to run after each JS file is compiled. The absolute path to the output JS file is appended as an argument. The path respects the in-source setting. The command runs in the directory containing the rescript.json where it is defined.
The shell command is running in dev time, and you generated could should be checked in, the depedency is tracked properly during dev time,example: { "name" : "ocamllex", "command" : "ocamllex.opt $in -o $out"}
Note that we will add the directory path accordingly
Example: "src" or ["src", "test"] or [{"dir": "src", "subdirs": [...]}]
path to gentype, path resolution is similar to ReScript
Whether to apply the specific version of JSX PPX transformation
JSX module. Either "react" for React, or (since v11.1) any valid module name to apply a generic JSX transform.
Whether to preserve the JSX in the output. Requires version to be set.
A mapping to extend the autocompletion for a given type with an array of modules. E.g. { "int": ["IntUtils", "IntExt"] } will extend the autocompletion of the int type with the values from IntUtils and IntExt modules.