KiYugadgeter
KiYugadgeter

Reputation: 4014

Using ES6 on Electron app with io.js

I am writing cross-platform application with electron. I want to be enable ES6 arrow-function feature in main process using like iojs --harmony_arrow_functions.

Electron already installed successfully on io.js 3.1.0 .

How I can do it with io.js?

Upvotes: 0

Views: 284

Answers (2)

psulek
psulek

Reputation: 4428

Electron was switched to nodejs, currently 5.1 see here - https://github.com/atom/electron/releases/tag/v0.36.0

Upvotes: 0

justin.m.chase
justin.m.chase

Reputation: 13655

If you go to the electron releases, in major/minor release notes you can see which version of nodejs it is using: https://github.com/atom/electron/releases/tag/v0.36.0

  • Upgrade to Node 5.1.1.

I'm not totally sure which version of node arrow functions first became available but I can confirm that they are available in the latest version, 5.2.0.

Relatedly, to easily switch between versions of node I highly recommend using nvm: https://github.com/creationix/nvm

That way you can easily switch to match updated versions of electron and you can automate it quite easily as well.

Upvotes: 0

Related Questions