babel-transpiler 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 21065e4561b80d9c3548cfc9b8e56c9fae6cd333
4
+ data.tar.gz: 8003173c7d7f2e8baf3aac7d300c9260a19c6139
5
+ SHA512:
6
+ metadata.gz: 1e3745879f66b55016ef03426a1dde0b2d3cc8ccab6a71cc7ef81e20332215b0b9d9098e35866876fd0738f31cd3be3d0817e67e61a9aabb3d18bfb46d008be8
7
+ data.tar.gz: 1fb5cdc047929aebd63e52703c673b8a1f4cfc14f1bec58ec34d48c8745f46577111d6d0d10d9c8e2ce1b1239a5fa5a035fdeddc0cca8073df59650b5781426a
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015 Joshua Peek
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ require 'babel/transpiler'
@@ -0,0 +1,31 @@
1
+ require 'execjs'
2
+ require 'babel/source'
3
+ require 'babel/transpiler/version'
4
+
5
+ module Babel
6
+ module Transpiler
7
+ def self.version
8
+ VERSION
9
+ end
10
+
11
+ def self.source_version
12
+ Source::VERSION
13
+ end
14
+
15
+ def self.source_path
16
+ Source::PATH
17
+ end
18
+
19
+ def self.script_path
20
+ File.join(source_path, "babel.js")
21
+ end
22
+
23
+ def self.context
24
+ @context ||= ExecJS.compile("var self = this; " + File.read(script_path))
25
+ end
26
+
27
+ def self.transform(code, options = {})
28
+ context.call('babel.transform', code, options.merge('ast' => false))
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,5 @@
1
+ module Babel
2
+ module Transpiler
3
+ VERSION = "0.6.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: babel-transpiler
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
5
+ platform: ruby
6
+ authors:
7
+ - Joshua Peek
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: babel-source
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '4.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5'
33
+ - !ruby/object:Gem::Dependency
34
+ name: execjs
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: minitest
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '5.5'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '5.5'
61
+ description: |2
62
+ Ruby Babel is a bridge to the JS Babel transpiler.
63
+ email: josh@joshpeek.com
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - LICENSE
69
+ - lib/babel-transpiler.rb
70
+ - lib/babel/transpiler.rb
71
+ - lib/babel/transpiler/version.rb
72
+ homepage: https://github.com/babel/ruby-babel-transpiler
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.4.5
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: Ruby Babel JS Compiler
96
+ test_files: []