Giter Site home page Giter Site logo

Startup page about vscode-live-server HOT 6 CLOSED

zorgoz avatar zorgoz commented on May 19, 2024 1
Startup page

from vscode-live-server.

Comments (6)

zorgoz avatar zorgoz commented on May 19, 2024 1

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.

from vscode-live-server.

ritwickdey avatar ritwickdey commented on May 19, 2024 1

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

from vscode-live-server.

ritwickdey avatar ritwickdey commented on May 19, 2024

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"

from vscode-live-server.

ritwickdey avatar ritwickdey commented on May 19, 2024

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?

from vscode-live-server.

zorgoz avatar zorgoz commented on May 19, 2024

from vscode-live-server.

ritwickdey avatar ritwickdey commented on May 19, 2024

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 :)

from vscode-live-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.