Frontend Masters Boost RSS Feed https://frontendmasters.com/blog Helping Your Journey to Senior Developer Thu, 15 Aug 2024 13:22:54 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 225069128 TUIs https://frontendmasters.com/blog/tuis/ https://frontendmasters.com/blog/tuis/#respond Thu, 15 Aug 2024 13:22:53 +0000 https://frontendmasters.com/blog/?p=3487 I mentioned lazygit the other day, a project I find to have a tremendously well done interface for being entirely at the command line. As frustrated as I get with tmux sometimes (the scrolling and the copying text, ughgkh), I still find it to be useful and impressive that “UI” can exist at all in the terminal.

I’ve since seen Posting, an API client, which also looks amazing. The Charm tools are pretty jaw dropping to me, which include stuff like a Markdown app and email sender. Turns out, there are actually a ton of “TUI” apps, collected here by Justin Garrison. An SQL client, a file manager, and an image viewer, are a few that caught my eye.

]]>
https://frontendmasters.com/blog/tuis/feed/ 0 3487
Lazygit https://frontendmasters.com/blog/lazygit/ https://frontendmasters.com/blog/lazygit/#respond Tue, 02 Jul 2024 14:32:05 +0000 https://frontendmasters.com/blog/?p=2880 I’ve long been a GUI guy for using Git (🔗). It just makes sense to me to clearly visually see an manipulate the files I’m staging and committing, seeing nice lists of current branches and PRs at a glance, and seeing the diffs and conflicts in a dedicated UI. But I get it, a lot of developers are just terminal people. They are very comfortable there and can do anything I can do (probably better).

I just found out about Lazygit, and am finding it a fascinating in-between of command-line Git and GUI Git. A TUI, if you will, a Terminal User Interface, which I’m just now understanding is a thing. Some people totally love it, and I’m giving it a bit of a whirl for fun.

Oh, and speaking of TUIs, if you were interesting in building one, the tools available at charm.sh are pretty mind-blowing.

]]>
https://frontendmasters.com/blog/lazygit/feed/ 0 2880
Make VS Code Automatically Run Your Project Startup Commands When You Open That Project’s Folder https://frontendmasters.com/blog/vs-code-auto-run-commands/ https://frontendmasters.com/blog/vs-code-auto-run-commands/#respond Tue, 26 Dec 2023 22:30:20 +0000 https://frontendmasters.com/blog/?p=315 Do you have a project where every time you open up that project’s root folder in VS Code, you need to run something like npm run dev to get started working? It’s likely that spins up the compiler and server and such needed to see and work on the site. Myself, I’ve got lots of projects like that.

I think it’s tremendously useful to automate this, and fortunately VS Code makes it easy. Say our whole goal is literally to run npm run dev when a particular projects root folder is opened. To do this: create a file called tasks.json in the root project folder’s .vscode folder, then add this:

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "npm",
      "script": "dev",
      "runOptions": {
        "runOn": "folderOpen"
      }
    }
  ]
}

It should look something like this within your project:

(It’s the same folder that holds the settings.json file you can use for per-project settings. I use that for stuff like what files/folders to ignore in the sidebar and search.)

Now next time you open that project folder, it’ll run that script:

You may get a permissions popup to approve if it’s your first time.

You can also manually approve or disapprove this functionality. From the Command Palette search for “Manage Automatic Tasks” and you’ll get this.

You can also search for “task” in the Command Palette and the tasks that you’ve defined will appear as commands you can run on-demand.

This is all well-documented in the VS Code documentation. Note that the full command “npm run dev” doesn’t appear in that tasks.json file. That’s because npm is a special “auto detected” task type in VS Code, which is also true for Gulp, Grunt, and Jake. You aren’t limited to those though, you can any shell or process command. Also note that tasks is an array, so you can set up and run multiple commands.

Me, I just like keeping it simple and running a single command. But if this appeals to you, check out those docs as there is lots of configurable power here. My experience beyond this in local development that needs to run a lot of commands to get going is centered around tmux, so check that out if you find yourself in a situation where you are needing run, say, more than 4 commands to kick off a dev enviornment.

]]>
https://frontendmasters.com/blog/vs-code-auto-run-commands/feed/ 0 315