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

Enable start server from absolute/relative filename #388

Closed
andreamah opened this issue Dec 9, 2022 · 1 comment · Fixed by #400
Closed

Enable start server from absolute/relative filename #388

andreamah opened this issue Dec 9, 2022 · 1 comment · Fixed by #400
Assignees
Labels
feature-request Request for new features or functionality verified Verification succeeded
Milestone

Comments

@andreamah
Copy link
Contributor

Relevant to #384

livePreview.start.preview.atFile used to take a string argument for the path, but takes a URI input now because of some extension cleanup. This means that a tasks.json that looks like:

{
    "version": "2.0.0",
    "tasks": [        {
            "label": "test",
            "command": "${input:preview-test}",
            "problemMatcher": []
        }],
    "inputs": [
        {
            "id": "preview-test",
            "type": "command",
            "command": "livePreview.start.preview.atFile",
            "args": "any-file.html"
        }
    ]
}

won't work.

This feature request proposes that there is a new command that takes in a string to preview such that extensions and users can use with schemes that can only take simple inputs.

@andreamah
Copy link
Contributor Author

Verif steps:

Create a tasks.json like this:

{
	"version": "2.0.0",
	"tasks": [
		{
			"label": "Preview Page",
			"command": "${input:preview-args}",
			"problemMatcher": []
		}
	],
	"inputs": [
		{
			"id": "preview-args",
			"type": "command",
			"command": "livePreview.start.preview.atFileString",
			"args": "{path_to_preview}"
		}
	]
}

Where the path to preview can be an absolute or relative path. Then, run the Preview Page to view the page that you linked.

@andreamah andreamah added the verification-needed Verification of issue is requested label Jan 23, 2023
@eleanorjboyd eleanorjboyd added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants