Skip to content
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

Startup page #2

Closed
zorgoz opened this issue Jul 2, 2017 · 6 comments
Closed

Startup page #2

zorgoz opened this issue Jul 2, 2017 · 6 comments

Comments

@zorgoz
Copy link

zorgoz commented Jul 2, 2017

Even if I have a html page opened in the acive editor form an other folder, "Go Live" will serve the file with the same name from workspace root.

appModel.ts (114): let rootPath = WorkSpacePath ? WorkSpacePath : documentPath;
Will WorkSpacePath ever be null?

@ritwickdey
Copy link
Owner

ritwickdey commented Jul 2, 2017

First, Thanks a lot for the feedback.

WorkSpacePath will be Undefined if user open a single file - no workspace.

anyway, I don't got your point. Please clear me.
Live Server will open a server form Workspace root. if workspace is not available then it will start server from current active document's root.

you mentioned "an other folder". Is the folder is not sub folder of the workspace?

I got another issue in appModel.ts : if (fileExtension != "html") fileName = null;. That should be fileExtension != ".html"

@zorgoz
Copy link
Author

zorgoz commented Jul 2, 2017

Hello!
Ok, I understand. But this is still a hard restriction: why should the workspace root be the web root
as well? Mine is a subfolder of the workspace.
It is confusing anyway: the file name is from the active editor, but the folder served is totaly different. What if there is no file with the same name in the workspace root? You will get a directory listing... quite useless.
I think that you should let the user decide if he/she wants to serve the currently opened file or a specific file from the workspace - I am sure, the later will be the most used scenario.
I suggest you add a setting (like the port), where the user can specify any html file relative to the workspace root. If the setting is missing then it should fall back to serving the currently edited file (indifferent if there is a workspace or not). If the setting is pointing to an inexistent file or file is not html, then the directory listing is adequate.

@ritwickdey ritwickdey self-assigned this Jul 2, 2017
@ritwickdey
Copy link
Owner

ritwickdey commented Jul 2, 2017

Okay. I got your point. I'll definitely try to add the settings :)

@ritwickdey ritwickdey removed their assignment Jul 2, 2017
@ritwickdey
Copy link
Owner

ritwickdey commented Jul 3, 2017

Hi, I've added the feature through a setting as you suggested. :) Yet I have not published the version. Tomorrow I'll push the version to marketplace. okay?

@zorgoz
Copy link
Author

zorgoz commented Jul 4, 2017 via email

@ritwickdey
Copy link
Owner

Hi, I published a new version with the features. let me know if you like it or not. :)

For now, I am closing this to issue list.
Feel free to suggest me or report bug :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants