Hey @sukmawijoyo78 !
Just click the ⋮ next to “Files” then click “Show hidden files”. Next click on the .replit
file and finally you can change the entrypoint
to whatever file you want to run.
Images
You should also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl
And if you want to run the last edited file, take a look at this post:
improved: add/change to start of .replit
:
onBoot = '''/nix/store/fbi9r30p3lqk96lmw5b1v1bpbj62cr2l-inotify-tools-3.20.11.0/bin/inotifywait -rqme create --format=%f%w --include='\..+\.py.[0-9]+~' .|while
read f
do
f=${f#.}
o=
r=
while
read -r l||[ "$l" ]
do
case $r
in
"")case $l
in entrypoint*)m="${l%\"*\"}\"${f#*~./}${f%.*~*}\""
case $m
in
"$l")break
esac
l=$m
r=1
esac
esac
o="$o$l
"
false
done<.replit||echo -n "$o">.replit
done'''
And run kill 1
in Shell.
This will map the entrypoint to the last file you edited through the IDE.
Replace .+\.py
on line 1 with the ERE of the files you want to be auto-set as entrypoint.
(I tried an option which checks for you just visiting the file in the editor but I found that that’s impossible. Maybe you can do this with an extension)