filipedeschamps / rss-feed-emitter

Super RSS News Feed aggregator written in Node.js and ES6
MIT License
1.08k stars 76 forks source link

9. Add transpiler dependencies #127

Closed filipedeschamps closed 8 years ago

filipedeschamps commented 8 years ago

Now it's time to add some dependencies to transpile our code back to ES5.

Dependencies

Add this two modules to your Dev Dependencies:

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

The first one is Babel's compiler. Mocha, our test runner, will use it to be able to read our ES6 code and test. The second one is all ES5 configuration specs bundled in one single package.

Babel configuration file

Last but not least, we need to create a .babelrc file. This will tell Babel what it needs to load, for example, the ES5 specs we installed above:

{
  "presets": ["es2015"]
}

Next step

10. Create your first automated test to cover the public interface