Now a days with the time we spend in our terminals it's nice to know how to do very basic things without leaving the terminal. So what would we need to do if we had to create a new directory, initialize a project, create a index file and open that file in a code editor. It's actually pretty simple and I only have trouble ever, remembering one part of it. The steps are as follows:
First we may need to get to whatever directory we want to create our project directory, for instance. If that were in my projects folder it might look like this:
Next, we need to create our project folder:
Again we need to change directories to get us inside:
Now we need to initialize a git repository to track our changes on the project:
And while we're at it, we need to bring in the ability to work with NPM. This will prompt us to create our default config for the project.
Finally to get started, we are just going to create an
index.html file, but in reality this could be an
index.js or whatever initial file you want to start working on.
type nul > index.html
Open in Visual Studio Code: