Skip to content

Commit

Permalink
Add field descriptions with explanations in YAML configuration
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
pixel365 committed Feb 18, 2025
1 parent 7902228 commit 557c18f
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions internal/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Check warning on line 119 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L113-L119

Added lines #L113 - L119 were not covered by tests
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).

Check warning on line 124 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L121-L124

Added lines #L121 - L124 were not covered by tests
paths:
- ./examples/structure/bitrix/components
- ./examples/structure/bitrix/components # List of paths to files that will be mapped.

Check warning on line 126 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L126

Added line #L126 was not covered by tests
- ./examples/structure/local/components

Check warning on line 128 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L128

Added line #L128 was not covered by tests
- name: "templates"
relativePath: "install/templates"
ifFileExists: "replace"
paths:
- ./examples/structure/bitrix/templates
- ./examples/structure/local/templates

Check warning on line 135 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L135

Added line #L135 was not covered by tests
- name: "rootFiles"
relativePath: "."
ifFileExists: "replace"
paths:
- ./examples/structure/simple-file.php

Check warning on line 141 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L141

Added line #L141 was not covered by tests
- name: "testFiles"
relativePath: "test"
ifFileExists: "replace"
paths:
- ./examples/structure/simple-file.php

Check warning on line 147 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L147

Added line #L147 was not covered by tests
ignore:
- "**/*.log"
- "**/*.log" # List of files or patterns to ignore during the build or processing (e.g., log files).

Check warning on line 149 in internal/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/helpers.go#L149

Added line #L149 was not covered by tests
`
}

Expand Down

0 comments on commit 557c18f

Please sign in to comment.