Open bharathsn0812 opened 8 years ago
@bharathsn0812 You can see the usage here - https://github.com/babel/ruby-babel-transpiler/blob/master/test/test_babel_transpiler.rb
@bharathsn0812 Just to add to this, here's an example of what I'm doing https://github.com/jwoertink/fez/blob/master/src/templates/Rakefile.ecr#L5-L10
The Babel::Transpiler.transform
method will return a hash where the code
key is a giant string of the converted code. Just write that to a file, and call it "whatever.js".
Hi,
I am novice to ruby also es6
have created file foo.es6 which contains below code
in ubuntu command line sudo gem install babel-transpiler -which installed babel-gem
then running ruby file esjs.rb
will this convert es6 to js??