microsoft / codetour

VS Code extension that allows you to record and play back guided tours of codebases, directly within the editor.
https://aka.ms/codetour
MIT License
4.36k stars 113 forks source link

Make it so npm tasks can be run from markdown-based text in steps #51

Closed BrianRosamilia closed 4 years ago

BrianRosamilia commented 4 years ago

(Partially from #39 )

A suggestion that would have really helped me and I think would be amazing and really set this project ahead of traditional presentation tools :

I was glad to see the tour steps support markdown.

So when I type npm run storybook it shows how I expect it and how another developer would like to read it.

But it would be great if typing that was translated to

▶️ npm run storybook

And clicking the play button would actually run the task.

I was using Codetour to do a live presentation to a group of developers and it was slightly cumbersome to use my (extremely loud) mechanical keyboard to show a few new npm tasks. It would've been great to just click a button and show a task running.

lostintangent commented 4 years ago

Thanks for reporting this! I absolutely want to enable this :) It's currently dependent on a change in VS Code itself, and so once that's shipped, I'll add support for this: https://github.com/microsoft/vscode/issues/93034.

// CC @rebornix

lostintangent commented 4 years ago

This feature has been shipped in the latest extension update. In a step comment, you can now embed a shell command using the following syntax: >> npm run compile, where npm run compile is an arbitrary shell command. That syntax will be converted into a hyperlink, that when clicked, will run the shell command in the VS Code integrated terminal.

Let me know if you have any feedback on this experience!