From 557c18f56770439ad72f4381bf38e73d6c1de8de Mon Sep 17 00:00:00 2001 From: Ruslan Semagin Date: Tue, 18 Feb 2025 16:26:18 +0300 Subject: [PATCH] Add field descriptions with explanations in YAML configuration - Added comments to describe the purpose of each field in the configuration. - Provided details on possible values for 'ifFileExists' field. - Clarified that 'name' in 'mapping' can be arbitrary for convenience. Signed-off-by: Ruslan Semagin --- internal/helpers.go | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/internal/helpers.go b/internal/helpers.go index 593a028..f153055 100644 --- a/internal/helpers.go +++ b/internal/helpers.go @@ -110,37 +110,43 @@ func GetModulesDir(path string) (string, error) { } func DefaultYAML() string { - return `name: test -version: 1.0.0 -account: test -repository: "" -buildDirectory: "./dist" -logDirectory: "./logs" + return `name: test # The name of the project or build. +version: 1.0.0 # The version of the project or build. +account: test # The account associated with the project. +repository: "" # The repository URL where the project is stored (can be empty if not specified). +buildDirectory: "./dist" # Directory where the build artifacts will be output. +logDirectory: "./logs" # Directory where log files will be stored. + mapping: - - name: "components" - relativePath: "install/components" - ifFileExists: "replace" + - name: "components" # Name of the mapping, describing what the mapping represents (e.g., components). + # This can be any name that makes sense for your project, used for your own convenience. + relativePath: "install/components" # Relative path in the project to map files to. + ifFileExists: "replace" # Action to take if the file already exists (options: replace, skip, copy-new). paths: - - ./examples/structure/bitrix/components + - ./examples/structure/bitrix/components # List of paths to files that will be mapped. - ./examples/structure/local/components + - name: "templates" relativePath: "install/templates" ifFileExists: "replace" paths: - ./examples/structure/bitrix/templates - ./examples/structure/local/templates + - name: "rootFiles" relativePath: "." ifFileExists: "replace" paths: - ./examples/structure/simple-file.php + - name: "testFiles" relativePath: "test" ifFileExists: "replace" paths: - ./examples/structure/simple-file.php + ignore: - - "**/*.log" + - "**/*.log" # List of files or patterns to ignore during the build or processing (e.g., log files). ` }