Wednesday, 7 June 2017

How to run node.js ES6 file on mac

Can someone help me run a node.js file that has ES6 features? This is my current workflow:

  • Save change in file
  • npm run build --- builds file to my src/dist folder
  • cd into my dist directory
  • node
  • var file = require('./index.js')
  • file.someMethod()

Then when I make a change to my method, I need to repeat all the steps above again.

Does anyone know of a more efficient way to do this?

Thanks in advance!



via John Grayson

No comments:

Post a Comment