Let's run npm install babel-cli and babel-preset-latest. These are development dependencies, let's use the save-dev flag to store them in our package.json.
Now, if we take a look at our package.json, we see in the dev dependencies that there is the babel-cli and babel-preset-latest. This means that our project has access to the binaries of these packages that we can use in our project. To use them, let's go back up to our scripts and we can add a new script called build.
When we run this script, we want it to use our babel binary that we have access to, and compile everything in the source directory out to the build directory.
Now, let's add a new configuration to our package.json called babel, and it's going to need a key called presets. This key will take an array, and for us, we just need the latest preset that we've installed.
I'm going to create a directory called source, and then inside of that, create a file called index.js, now inside this file, let's export a default function, this is going to return a string that says, "Hello, World."