🔥 AdonisJS From Scracth Early Access is Now Open!

Configuring VS Code for AdonisJS development

Transcript

The final component of our development environment is a code editor. While you can choose any code editor or ID you prefer, I will use Visual Studio Code throughout this course. If you would like to use Versus Code and haven't installed it yet, you can download the appropriate version for your operating system from the official Versus Code website. Adonis GS integrates well with Versus Code through first party extensions. Installing these extensions is essential to ensure a seamless development experience with adonis gs in v s code.

The first one is the official adonis gs extension for v s code. With this extension, you can do things like run ace commands through the command palettes or through the activity bar, view routes within Versus Code, consult and search the Adonis JS documentation directly from Versus Code, auto completion and go to controller, and so much more. To install this extension, you can click on the install button here which will take you to Versus code or you can head over to Versus code. And under extensions, you can search for Adonis JS. As you can see, we have different results.

The one we are interested in is the first one which is the Adonis JS extension. As you can see, I already have it installed. But in your case, this should be an install button and not an uninstall button. So you simply install it. The next extension we need to install is the edge template syntax Aliter.

This is an extension that adds Edge JS templates support to Versus Code. Since I've already searched for Adonis JS, you can see it as part of the results. Again, you can install it by clicking the install button. I already have it installed so that is why I'm not seeing the install option. If you want to use Emmet in your edge templates, you can add the following configuration inside your v s code settings.

The last extension we need to install is the japa extension for v s code. Japa is a testing framework for Node JS created by the creator of adonis JS and it is the testing framework that adonis JS uses by default. Though, we won't be covering testing in this course, but it is worth installing to have that end to end experience when you start writing test in the Adonis JS. As you can see, once again, I already have it installed. So you can install it also.

So that is how to configure Versus Code for Adonis JS development.