Skip to content

Instantly share code, notes, and snippets.

@Alexzanderk
Forked from rahman541/ES6-Setup.md
Last active February 19, 2020 07:13
Show Gist options
  • Save Alexzanderk/6cb7e8062e155f90824c4febb2ecd76d to your computer and use it in GitHub Desktop.
Save Alexzanderk/6cb7e8062e155f90824c4febb2ecd76d to your computer and use it in GitHub Desktop.
ES6 Setup with nodemon

ES6 Setup

npm init -y
npm i --save-dev nodemon
npm add babel-preset-env babel-cli

Create a .babelrc config in your project root. Insert the following

{
  "presets": ["env"]
}

In package.json add this to scipts:

"dev": "nodemon --exec babel-node index.js"

To run: npm run dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment