File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,6 +185,13 @@ run() {
185185
186186 elif [[ ${FILE#* .} == sh ]]; then
187187 ./" $FILE "
188+
189+ elif [[ ${FILE#* .} == js ]]; then
190+ if [[ $DEBUG == true ]]; then
191+ node debug " $FILE "
192+ else
193+ node " $FILE "
194+ fi
188195
189196 else
190197 _ERROR_UFTC_
@@ -206,16 +213,17 @@ for arg in "$@"; do
206213 " ll" | " --list-langs" )
207214 echo
208215 echo " ${cyan} Languages supported by the currently installed version of ${red} code-runner${cyan} :"
209- echo " ${yellow} >>${white} C ${cyan} [${white} with ${green} debug${white} support${cyan} ]"
210- echo " ${yellow} >>${white} C++ ${cyan} [${white} with ${green} debug${white} support${cyan} ]"
216+ echo " ${yellow} >>${white} C ${cyan} [${white} with ${green} debug${white} support${cyan} ]"
217+ echo " ${yellow} >>${white} C++ ${cyan} [${white} with ${green} debug${white} support${cyan} ]"
211218 echo " ${yellow} >>${white} Python"
212219 echo " ${yellow} >>${white} Rust"
213220 echo " ${yellow} >>${white} Java"
214221 echo " ${yellow} >>${white} Bash-Script"
222+ echo " ${yellow} >>${white} Javascript ${cyan} [${white} with ${green} debug${white} support${cyan} ]"
215223 echo
216224 ;;
217225
218- * " .c" | * " .cpp" | * " .py" | * " .rs" | * " .java" | * " .sh" )
226+ * " .c" | * " .cpp" | * " .py" | * " .rs" | * " .java" | * " .sh" | * " .js " )
219227 FILE_LOCATION=$arg
220228 if [[ ! -f $FILE_LOCATION ]]; then
221229 _ERROR_UFTC_
You can’t perform that action at this time.
0 commit comments