Skip to content

Instantly share code, notes, and snippets.

@travm
Last active January 7, 2016 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travm/969f064df078e549e7e9 to your computer and use it in GitHub Desktop.
Save travm/969f064df078e549e7e9 to your computer and use it in GitHub Desktop.
Writing Gulpfiles with ES6/2015 & Babel 6.0

Here's a quick tip to start writing your gulpfiles in ES2015 with Babel 6.0.

1. Rename Your Gulpfile

mv gulpfile.js gulpfile.babel.js

2. Install Babel Core & ES2015 Preset

npm install --save-dev babel-core babel-preset-es2015

3. Create A .babelrc File

Create the .babelrc file in your project root.

touch .babelrc

Next, open the file in your editor of choice and add the ES2015 preset to the file and save it.

{
  "presets": ["es2015"]
}

4. Gulp!

With those items resolved, you can now write your gulpfile in ES2015. Enjoy!

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