Jimmyt1988
Jimmyt1988

Reputation: 21146

Compiling ecma script 6 with Node traceur

I can't seem to get the tutorial to work: https://github.com/google/traceur-compiler/wiki/CompilingOffline

It puts "..." in the command line.

I close Node and re-open...

I then put it without the $ and it says:

Invalid REPL keyword
undefined

What am I doing wrong?

Upvotes: 2

Views: 460

Answers (1)

Cedric Dumont
Cedric Dumont

Reputation: 1029

in fact you have to install traceur globally so you can use it from the command line. you need to install it like this

from the command line of a cmd prompt launch the following

  your path>npm install traceur -g

see the "-g". then you must not start node but use traceur from the command prompt itself

  your path>traceur --dir ./src ./ dest

where src contains your es6 files and dest will be the result

Upvotes: 1

Related Questions