diff --git a/scripts/dev/typescript-oo/classes/BackendPackage.class.sh b/scripts/dev/typescript-oo/classes/BackendPackage.class.sh index 20f20543..5fa4ccf4 100644 --- a/scripts/dev/typescript-oo/classes/BackendPackage.class.sh +++ b/scripts/dev/typescript-oo/classes/BackendPackage.class.sh @@ -55,7 +55,11 @@ BackendPackage() { [[ ! "$(array_contains "${folderName}" "${ts_launch[@]}")" ]] && return logInfo "Launching: ${folderName}" - npm run launch + if [[ "${ts_debugFunction}" ]]; then + npm run debug + else + npm run launch + fi } _clean() { diff --git a/scripts/dev/typescript-oo/params.sh b/scripts/dev/typescript-oo/params.sh index f1124302..617bb4a0 100644 --- a/scripts/dev/typescript-oo/params.sh +++ b/scripts/dev/typescript-oo/params.sh @@ -14,6 +14,7 @@ ts_linkThunderstorm= ts_lint= ts_runTests= ts_publish= +ts_debugFunction= ts_fileToExecute="index.js" checkCircularImports= @@ -53,6 +54,7 @@ params=( ts_runTests ts_publish ts_fileToExecute + ts_debugFunction "ts_generate[@]" "ts_launch[@]" "ts_deploy[@]" @@ -277,6 +279,11 @@ extractParams() { ts_launch+=($(regexParam "--launch|-l" "${paramValue}")) ;; + "--debug-function" | "-dbf") + #DOC: It will add the provided App to the launch list + ts_debugFunction=true + ;; + "--file="* | "-f="*) #DOC: The file name to launch #NOTE: Apply on to the executable apps