Skip to content

Commit

Permalink
added JavaScript Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadens-arc committed Jun 13, 2020
1 parent 229a1aa commit 4f52d6f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Scripty.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def executeCode():
elif '.c' in fileLine:
os.system('gcc ' + str(fileLine) + ' -o ' + fileLine[:-2])
os.system('cd / && .' + fileLine[:-2])
elif '.js' in fileLine:
os.system('node ' + str(fileLine))

# finds which programming language the program is written in
# runs code using that language
Expand Down Expand Up @@ -290,6 +292,8 @@ def tab(arg):
editor.insert(INSERT, " " * configFile["java-indent-spacing"])
elif '.cpp' in str(fileLine):
editor.insert(INSERT, " " * configFile["cpp-indent-spacing"])
elif '.js' in str(fileLine):
editor.insert(INSERT, " " * configFile["js-indent-spacing"])
else:
editor.insert(INSERT, " " * configFile["default-indent-spacing"])
return 'break'
Expand Down Expand Up @@ -382,3 +386,4 @@ def autoIndent(arg):




6 changes: 6 additions & 0 deletions Settings/Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"python-indent-spacing": 4,
"java-indent-spacing": 4,
"cpp-indent-spacing": 3,
"js-indent-spacing": 2,

"default-indent-spacing": 4,
"auto-indent": true,
Expand All @@ -27,3 +28,8 @@

}






1 change: 1 addition & 0 deletions Settings/DefaultConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"python-indent-spacing": 4,
"java-indent-spacing": 4,
"cpp-indent-spacing": 3,
"js-indent-spacing": 2,

"default-indent-spacing": 4,
"auto-indent": true,
Expand Down

0 comments on commit 4f52d6f

Please sign in to comment.