Introduction to Configuration Files

In the .soap directory of your SoapJS project, you'll find several key configuration files. These files dictate how the CLI operates, define your project's setup, and ensure that your coding environment aligns with the Clean Architecture principles. Here's a breakdown of these crucial files:

cli.config.json

This file holds the default settings for the CLI's operation. Here's a brief overview of what each setting does:

  • headless_mode: A boolean indicating whether the CLI should run without prompting the user for input when ambiguities are encountered, particularly useful in CI/CD pipelines. Default: false

  • override: ensuring that existing files are not overwritten unless the --force option is used. Default: false

  • skip_tests: If true, the CLI skips the generation of unit test templates for testable components. Default: false

  • with_dependencies: Determines whether dependent files (like models or entities) should be generated alongside the main component. Default: false

  • batch_size: The number of source files generated in one batch. Default: 10

  • thread_count: The number of threads (workers) used for code generation; by default, there is no limit. Default: -1

  • transport: Defines how the generated code is outputted, with the default mode being file storage. Default: "file"

plugin-map.json

This JSON file maps out the available packages and plugins based on the chosen language. It includes necessary packages for project creation, database interactions, and web frameworks suited for the selected language. Changes to this file are local to the project, allowing for customization but they remain local, not affecting the global settings.

The latest map of plugins used by the CLI can be found here.

plugin.config.json

This is a vital configuration file that outlines structures and basic information related to the selected language, database, or framework. It includes:

  • language: Defines basic types and the relative path or name of the source code directory.

  • databases: An array of database settings, including mappings and case styles for table names, columns, or properties.

  • architecture: Contains the configurations related to framework components, allowing the setting of file names, class paths, default values, methods, parameters, imports, and inheritances.

The use of Dynamic Template Expressions within this file allows for the application of previously supplied user data, offering a degree of customization and flexibility.

project.config.json

This configuration file contains essential details about the project, such as name, description, used databases, source folder, and frameworks. It's critical for code generation and the setup of aspects like the package.json file for JavaScript projects.

texts.json

Houses all the translations used within the project, assigning them to corresponding keys. This allows for easy modification and customization of texts according to personal preferences or project requirements.

Understanding and correctly managing these configuration files is essential for maintaining the efficiency and effectiveness of your SoapJS project development process.

Last updated