Skip to content

Instantly share code, notes, and snippets.

@bitgord
Created December 11, 2016 21:27
Show Gist options
  • Save bitgord/d718bcab2f7658a5692855bd9e5fb0e2 to your computer and use it in GitHub Desktop.
Save bitgord/d718bcab2f7658a5692855bd9e5fb0e2 to your computer and use it in GitHub Desktop.
Quick setup of a ES6 environment with nodemon and babel
// First you need to have node version 5 or newer
// Create a new project folder with a package.json file
mkdir [[new project name]]
cd [[new project name]]
npm init
// Install babel
npm install babel-preset-es2015
// Create new file .babelrc to configure and in file include this
{
"presets": ["es2015"]
}
// Install and configure nodemon
sudo npm install -g nodemon
nodemon --exec babel-node [[PATH TO FILE]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment