babel / babel/ruby-babel-transpiler
how to use babel transpiler in ruby
- Dominant language
- Ruby
- Stars
- 175
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
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??
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with esjs.rb and foo.es6, focusing on the Babel::Transpiler.transform call and the input file it reads. Confirm the expected transformed-JavaScript output and document the usage if this workflow is supported; done when a newcomer can follow the steps and verify the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, ruby
- Domain
- tooling
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100