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

add task provider to run d2 #47

Open
gavin-ts opened this issue Feb 24, 2023 · 7 comments
Open

add task provider to run d2 #47

gavin-ts opened this issue Feb 24, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@gavin-ts
Copy link
Contributor

gavin-ts commented Feb 24, 2023

provide task to simply run d2 (e.g. on a file and create an svg right next to it (can use the preview settings for layout/theme etc))

maybe on a whole directory, or maybe to format the whole workspace

see https://stackoverflow.com/questions/55135876/extension-api-task-provider-build-task-example

@gavin-ts gavin-ts added the enhancement New feature or request label Feb 24, 2023
@BarryNolte
Copy link
Collaborator

this should be relatively straightforward.

@BarryNolte
Copy link
Collaborator

With PR #48, this task is complete

@gavin-ts
Copy link
Contributor Author

#48 provides a command to run but a d2 render task could also be helpful in some cases

@gavin-ts gavin-ts reopened this Feb 28, 2023
@BarryNolte
Copy link
Collaborator

Could you be more specific?

@gavin-ts
Copy link
Contributor Author

gavin-ts commented Feb 28, 2023

vscode.tasks.registerTaskProvider vs commands.registerCommand

this has the same features but is different from #47 in that this is a command rather than registering a task provider that can be used e.g. from the tasks: run task command

d2task.mp4

Screen Shot 2023-02-24 at 7 53 12 PM

@BarryNolte
Copy link
Collaborator

Got it, should this even be available? Doesn't make much sense to me.

@gavin-ts
Copy link
Contributor Author

There's a lot of cool things that tasks support https://code.visualstudio.com/docs/editor/tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants