Hi,
I am novice to ruby also es6
have created file foo.es6 which contains below code
class View {
constructor(options) {
this.model = options.model;
this.template = options.template;
}
render() {
return _.template(this.template, this.model.toObject());
}
}
in ubuntu command line
sudo gem install babel-transpiler
-which installed babel-gem
then running ruby file esjs.rb
require 'babel/transpiler'
Babel::Transpiler.transform File.read("foo.es6")
will this convert es6 to 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??