bebop.json
A bebop.json
file in a directory indicates that the directory is the root of a Bebop project.
This page covers all of the different options available inside a bebop.json
file. There are five main sections:
- The root fields for letting the compiler know what files are available
- The generators section for defining how to generate code
- The watchOptions fields, for tweaking the watch mode
- The extensions section, for defining custom extensions
Root Fields
Include - include
Specifies an array of filenames or patterns to include in the compiler. These filenames are resolved relative to the directory containing the bebop.json file.
Which would include all .bop
files in the src
directory and all subdirectories.
include
and exclude
support wildcard characters to make glob patterns:
*
matches zero or more characters (excluding directory separators)?
matches any one character (excluding directory separators)**/
matches any directory nested to any level
If the last path segment in a pattern does not contain a file extension or wildcard character, then it is treated as a directory, and files with supported extensions inside that directory are included (e.g. .bop
).
Exclude - exclude
Specifies an array of filenames or patterns that should be skipped when resolving include.
No Warn - noWarn
Specifies an array of warning codes to silence during compilation.
No Emit - noEmit
Disable emitting files from a compilation.
Generators - generators
Specifies code generators to use for compilation.
Built-in generators alias are:
ts
- Generates TypeScript codecs
- Generates C# codecpp
- Generates C++ codepy
- Generates Python coderust
- Generates Rust codedart
- Generates Dart code
Out File - outFile
Specifies the output file for the generated code. This field is required for all generators.
Services - services
By default, the compiler generates a concrete client and a service base class. This property can be used to limit compiler asset generation.
Valid options are:
none
- Do not generate any service assetsclient
- Generate a concrete clientserver
- Generate a server base classesboth
- Generate both client and server assets
Emit Notice - emitNotice
Specify if the code generator should produce a notice stating code was auto-generated. (default true
).
Emit Binary Schema - emitBinarySchema
Specify if the code generator should emit a binary schema in the output file that can be used for dynamic (de)serialization. (default true
).
Namespace - namespace
Specify a namespace for the generated code. Casing will be adjusted to match the target language.
Options - options
Specify custom options for the code generator.
Watch Options - watchOptions
Settings for the watch mode of bebopc.
Exclude Files - excludeFiles
Remove a list of files from the watch mode’s processing.
Exclude Directories - excludeDirectories
Remove a list of directories from the watch process.
Extensions - extensions
An object of extensions the compiler should load.