Ask coding questions

← Back to all posts
.replit with websites
h
SixBeeps (2870)

I'm trying to import a Github repo based on HTML, CSS, and JS. The problem I'm having is that, because of how importing repos works, I don't see a way to configure the run config in the .replit file for "recompiling" the pages. Has this been done before?

Answered by Vandesm14 (2322) [earned 5 cycles]
View Answer
Commentshotnewtop
Vandesm14 (2322)

The .replit file does not work on html repls.

SixBeeps (2870)

@Vandesm14 Then is it possible to import web repos?

Vandesm14 (2322)

@niorg2606 I don't know. When you import, is it a bash repl or an html repl? If it's a bash repl, then it might be broken. If not, just remove the .replit file from the html repl.

Vandesm14 (2322)

@niorg2606 Repl.it does not currently support the importing of HTML repos. I suggest either reporting the feature request to https://repl.it/feedback or sending the bug to https://repl.it/bugs

AdCharity (1307)

Ok I don't understand the git hub run feature fully myself, and this probably not the documented way, but you could:

1) import the repo
2) select the correct language for and html repl
3) delete the replit file
4) assuming there's an index.html file, it should run perfectly fine

Now is this the correct way? Probably not. But in the mean time, it should work with reasonable effectiveness.

SixBeeps (2870)

@AdCharity See, I tried this, and it looks like when I add the .replit file, every single file and folder gets deleted. This is most likely a bug, but I just want to make sure, has this method worked for you?

AdCharity (1307)

@niorg2606 kk 1) if its not added don't add it lmao 2) I've only tried this on node.js repls with a static webpage projected to the client with express

kkwoo (0)

@AdCharity thanks for your post. Observation #4 made the difference. Let me contribute a little:

My findings are in line with AdCharity's observations and findings. Here's what I did:

That allowed me to achieve my goal of playing the Orbit demo and tinkering with it. It's not perfect because I now need to visit my hacked up /index.html and click through the HREF to see any changes I've made to the Orbit demo. A potential next step is to clone example/game-orbit/index.html into /index.html and change the relative URLs accordingly.