Ports generic-scripts-module-v1 into a routed skill: module anatomy, shared loggers/base modules, Taskfile integration, workflows, and pattern decisions. Fixes a latent defect in the loggers example that silenced all logging in the module scaffold: loggers/lib/--index-api.sh now sources --env-vars-reader.sh, and the reader preserves already-exported values so caller overrides still win. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
20 lines
637 B
Bash
20 lines
637 B
Bash
#!/bin/bash
|
|
|
|
. ./.scripts/loggers/lib/--index-api.sh
|
|
|
|
_moduleExampleV1_initializeOne() {
|
|
local FUNCTION_NAME="_moduleExampleV1_initializeOne"
|
|
|
|
_loggers_info "${FUNCTION_NAME}" "Initializing module-example-v1"
|
|
_loggers_debug "${FUNCTION_NAME}" "Name: ${MODULE_EXAMPLE_V1_NAME}"
|
|
_loggers_debug "${FUNCTION_NAME}" "Output directory: ${MODULE_EXAMPLE_V1_OUTPUT_DIR}"
|
|
|
|
if [ "${MODULE_EXAMPLE_V1_DRY_RUN}" = "true" ]; then
|
|
_loggers_info "${FUNCTION_NAME}" "Dry run enabled; no files will be changed."
|
|
return 0
|
|
fi
|
|
|
|
mkdir -p "${MODULE_EXAMPLE_V1_OUTPUT_DIR}"
|
|
_loggers_info "${FUNCTION_NAME}" "Initialization complete."
|
|
}
|