- [Tutor] This course will use ES6 syntax throughout.
And we want to be able to code our server
without worrying about any syntax breaking our application.
So, Babel is a tool we'll set up to help us work
with ES6 without any issues. So let's get to it.
So let's go back to visuals to do code
and what we're going to do is install a few more dependencies,
but we're going to install these as devDependencies.
So let's go ahead and do that.
So we're going to do npm i or install.
So you can use either install or i as a shortcut.
Dash dash, save,
dash dev.
So this is the command that will allow us
to install dependencies as devDependencies or development.
So let's go ahead and install first Babel
cli.
We also need Babel-preset
env.
So this is the main package that will allow us
to transpile our code.
And then Babel-preset
stage-0.
So if you want to have more information
about the different stages,
basically allows us access to different stage
of development for the JavaScript language.
So for example, ES7, ES8 and so on, so forth.
So, I always go for stage 0
which allows us to have access to all the latest
and the greatest. So now let's go ahead and hit return.
And now we have access to ES6.
So right now if you take a look at the package.json file,
we now have Babel-cli, preset environment, preset-stage-0.
One note is to always take a look at the messages here
because sometimes they change the actual package
that we're going to use to actually transfile our code.
Sometimes the stages will change.
So you want to make sure you have the latest
and most current information
or packages inside of your application.
So if you see any weird messages here,
so for example at one point this was called ES2015
and now they've changed it to environment.
If you took the previous version of this course,
we used to use ES2015 and now it's no longer used.
So you want to make sure you have the latest
and the greatest packages here.
So if you see any weird messages
while you install these packages,
make sure to fix or change what you're installing here
and you should be good to go.
So now that we've got our dependencies ready
to build our server with ES6 syntax,
let's move on to the next video.