File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,11 @@ class EmscriptenPlatform extends DesktopPlatform
213213 {
214214 if (project .hasDef (" pythonServe" ))
215215 {
216- runPython (arguments );
216+ var server = " " + project .getDef (" pythonServe" );
217+ if (server .endsWith (" .py" ))
218+ runPython (server ,arguments );
219+ else
220+ runPython (arguments );
217221 }
218222 else
219223 {
@@ -242,9 +246,9 @@ class EmscriptenPlatform extends DesktopPlatform
242246 }
243247
244248
245- public function runPython (arguments : Array <String >): Void
249+ public function runPython (? pythonFile : String , arguments : Array <String >): Void
246250 {
247- var command = sdkPath == null ? [ " -m" , " http.server" ] : [sdkPath + " /upstream/emscripten/emrun.py" ];
251+ var command = pythonFile != null ? [ pythonFile ] : sdkPath == null ? [ " -m" , " http.server" ] : [sdkPath + " /upstream/emscripten/emrun.py" ];
248252 var source = " index.html" ;
249253 // var source = ext == ".html" ? Path.withoutDirectory(executablePath) : "index.html";
250254 var browser = CommandLineTools .browser ;
You can’t perform that action at this time.
0 commit comments