![]() All right so here's where things get interesting. There are sort of parameters we can put into any of the strings that we have as values here. It's a placeholder that'll get filled in with the appropriate folder name. This would do nothing here simply cuz workspaceRoot is a default. You can add a current working directory inside this options object. Because we've got single quotes, double quotes, back-ticks and especially, when you're mixing tasks together, when it commence together, it can become difficult to keep all of that straight. This simply ensures that any arguments you pass are properly quoted. > Mike North: There is also an arguments property we can add here, this args array. Any shell command you can run you can set up in VS Code to execute in this way. ![]() > Mike North: And so this is an example of a shell task. > Mike North: There's our hello, right there. Right now we'll say continue without scanning the output and, unfortunately, my color scheme has bitten me here. So if we say run task echo, it's going to say what do you want me to do with the output? And it's just going to say, hello to us when we run it. Created it for the first time right now we should be able to click into it, yep. > Mike North: Configure task runner and say others, it would give us this tasks.json file. So this is what a very basic test looks like, and this would go in the tasks.json file that I've linked to here, right? Currently it's saying it can't open it cuz it doesn't exist yet, but if we were to say, However, code add some interesting things on top of those tasks, on top of things that like NPM could do. And the reason is not everyone on your team may use Visual Studio Code and so it becomes more useful to kind of have that consistency in a way that is editor agnostic. I've linked here to something called Scripty which works with package.json to allow you to maintain a folder of scripts, rather than letting your npm script to get difficult to maintain in large. > Mike North: In terms of my advice for deciding whether to put your stuff into Visual Code specific tasks or these files, I would say mostly you wanna keep things in those files. So those are already there and already kind of, just by that file being present, we get those. We can see I've got one that TypeScript has provided, so TypeScript to build task is there and then a couple that were pulled out of my package.json as npm scripts. Your rate file if you're using Ruby and it'll extract those out and make them available for you within the editor. Anything that has sort of, things that can be run. So one of the cool things about the way task running is handled in visual studio code is it'll look at your package jason. We're gonna touch on launch configurations and then we'll be done. ![]() > Mike North: So where we're going next is we're gonna talk about tasks. Now let’s explore the interface, in a little more detail.Transcript from the "Introducing Custom VS Code Tasks" Lesson Install the extension from the link above and test it out by adding a TODO to your source code like this: // TODO - todo note Clicking a TODO within the tree will open the file and put the cursor on the line containing the TODO. For a few months now, I have been using an extension called TODO Tree which displays a tree view in the explorer pane of VSCode. If you are using VSCode as your IDE, you already know there are a ton of extensions for almost everything you need. Gitkraken’s new Glo Boards are a great option as well, but may not fit your workflow.A Trello board is a good visual reminder, especially when coupled with the Trello mobile app.A Markdown file in the project directory.A handwritten list (who writes anymore?).How do you have those mental notes of TODO’s? There are a few simple options: So, the problem is how do you manage your TODO list as you are coding? You are working on basic functionality in a component and having a working plan, either in a working flow diagram or a written list. Photo by Glenn Carstens-Peters on Unsplash
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |