-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serve export overwrites html files without warning #36
Comments
I think this is the expected behavior. On a web server this would fail silently too because files in public would be served instead of files from the app. Or am I missing something? |
When I go to http://localhost:4000/ serve shows |
Good point. :) I think I can switch this around for Serve. Let me look into it. |
There's not an easy way to do this. I'd have to rewrite the Rack directory indexing stuff... Hrmmm... |
I didn't test it, but I would expect if you move line 21 of https://github.com/jlong/serve/blob/master/lib/serve/export.rb to the start |
That's true, but I want it to work that way. What I would like to do is get Serve to function the other way so that it mimics the functionality of both export and a normal Ruby deployment. |
So the way you want it to work is that serve first renders the .html file, and only processes the template if the .html file doesn't exist? |
Right, just like a regular Rack app. |
Files in public should be served first, then if those URLs don't exist Serve should check the views directory. |
Got it - will see what I can do about that. |
I had a Compass project that I converted into a Serve project. This procedure left an
index.html
file inside the public folder.When I start
serve export
it seems like it first renders everything to the target folder and then copies the public folder into target overwriting existing files inside the target folder.I think there are several methods how to deal with this.
I guess there are several other methods more for handling this problem. I would vote for 1 and could provide a patch if needed. Please tell me what you think.
The text was updated successfully, but these errors were encountered: