File tree Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Testing requires Python, Wally, Rojo, and Roblox Studio.
4
4
5
- 1 . Run ` python build_tests.py ` (will run in ` watch ` mode once built)
5
+ 1 . Run ` python build_tests.py ` or ` python build_tests.py watch`
6
6
2 . Run ` rojo `
7
7
3 . Sync project into a new Roblox Studio place
8
8
4 . Run the Roblox Studio place
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
from shutil import copytree , rmtree , move
4
4
import os
5
+ import sys
5
6
import time
6
7
from watchdog .observers import Observer
7
8
from watchdog .events import PatternMatchingEventHandler
@@ -64,21 +65,29 @@ def build_tests():
64
65
65
66
if __name__ == "__main__" :
66
67
68
+ if len (sys .argv ) >= 2 :
69
+ has_watch = sys .argv [1 ].lower () == "watch"
70
+ else :
71
+ has_watch = False
72
+
67
73
print ("Building tests..." )
68
74
build_tests ()
69
75
print ("\n Tests built" )
70
- print ("Watching for changes..." )
71
76
72
- observer = Observer ()
73
- observer .schedule (WatchHandler (), "./modules" , recursive = True )
74
- observer .start ()
75
-
76
- try :
77
- while True :
78
- time .sleep (1 )
79
- except KeyboardInterrupt :
80
- observer .stop ()
81
- finally :
82
- observer .join ()
77
+ if has_watch :
78
+
79
+ print ("Watching for changes..." )
80
+
81
+ observer = Observer ()
82
+ observer .schedule (WatchHandler (), "./modules" , recursive = True )
83
+ observer .start ()
84
+
85
+ try :
86
+ while True :
87
+ time .sleep (1 )
88
+ except KeyboardInterrupt :
89
+ observer .stop ()
90
+ finally :
91
+ observer .join ()
83
92
84
- print ("Stopped" )
93
+ print ("Stopped" )
You can’t perform that action at this time.
0 commit comments