-
Notifications
You must be signed in to change notification settings - Fork 40
bebop.json Reference
This document describes the usage of the Bebop compiler's configuration file (bebop.json
).
A bebop.json
file in a directory indicates that the directory is the root of a Bebop project. The config file can be either a bebop.json or *.bebop.json, both have the same set of config variables.
Specifies an array of filenames or patterns to include in the program. These filenames are resolved relative to the directory containing the bebop.json file.
Example:
"include": [
"**/*.bop"
]
Specifies an array of filenames or patterns that should be skipped when resolving include. The exclude
property only affects the files included via the include
property.
Example:
"exclude": [
"**/*.test.bop"
]
Optionally specifies a namespace that generated code will use.
Example:
"namespace": "MyNamespace"
Specifies a list of code generators to target during compilation.
Each generator must include the following properties:
-
alias
(required): Specify the code generator schemas will be compiled to. Must be one of:cs
,ts
,cpp
,dart
, orrust
. -
outFile
(required): Specify a file that bundles all generated code into one file. -
langVersion
: (optional) Specify the version of the language the code generator should target. -
noGenerationNotice
: (optional) Specify if the code generator should produces a notice at the start of the output file stating code was auto-generated. Default isfalse
. -
services
: (optional) By default, bebopc generates a concrete client and a service base class. This property can be used to limit bebopc asset generation. Must be one of:none
,client
,server
, orboth
. Default isboth
.
Example:
"generators": [
{
"alias": "cs",
"outFile": "./src/Generated.g.cs"
}
]
Settings for the watch mode in bebopc.
Each watch option is optional and can include the following properties:
-
excludeFiles
: (optional) Remove a list of files from the watch mode's processing. Supports globbing. -
excludeDirectories
: (optional) Remove a list of directories from the watch process. Supports globbing.
Example:
"watchOptions": {
"excludeFiles": [
"example.bop"
],
"excludeDirectories": [
"node_modules",
"build"
]
}
Example usage:
{
"include": [
"**/*.bop"
],
"exclude": [
"**/*.test.bop"
],
"namespace": "MyNamespace",
"generators": [
{
"alias": "cs",
"outFile": "./src/Generated.g.cs"
}
],
"watchOptions": {
"excludeFiles": [
"example.bop"
],
"excludeDirectories": [
"node_modules",
"build"
]
}
}