How to clone a git repository for HTML, CSS an Javascript and make it refreshes automatically?

Hi, guys, hope all of you are well! I’m trying to integrate my repls with my github account. Cloning a repository is not a problem at all. But, I’m lost trying to make my HTML, CSS and js files refresh automatically. I have been using the template here from replit to achieve this. But when I import files from my github, obviously I loose the files that make auto-refresh work. So, is there a way that I can make it work on replit? My main idea is to emulate kind of a visual studio code live server extension in replit. My goal is be able to work on my projects or lessons from anywhere without having to donwload anything, like we do when we work with github. Anyone can help me with this? Make my repl auto-refresh and I still being abble to push my changes to the original repository? Any help will be very appreciated! Thanks in advance!

P.S.: When I import from github, replit recognizes my files as bash project. I don’t know if it matters for what I’m trying to do.

Hey, @deusiel welcome to the forums.

I would recommend looking of the guide on importing a repository to Replit.

Press the Import from GitHub button, and you’ll see Replit clone the repository and turn it into a repl. In all of our previous projects, we used the main.py file that Replit automatically creates for all new Python projects, and which it runs automatically when you press the run button. Note how in this GitHub project, we have no main.py file, and our code is instead in mydemoapp.py. Therefore, Replit will need some help from you to define how to run the project. This is configured through another special file named .replit. If the configuration panel doesn’t pop up automatically, you can manually create a file called .replit and add the configuration given below otherwise select the language (Python) from the first dropdown and type python mydemoapp.py in the “configure the run button” input.

My guess would be that you put html/css for the language in the .replit file but I am not sure.

I have searched in the docs and I have read about this .replit file. The problem is when I try to find it I can’t and when I try to make one, replit says that it already exists.

I used to have this problem myself. You need to click show hidden files.
image

What you might be able to do is run git clone [repolink] in the current selected template and code from there.

To be able to commit and push to the repository, you will have to use the shell.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.