traceur-compiler 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/traceur_compiler.rb +7 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f434d5dc5849657e559e6d23c03d25ca5ff1032
|
4
|
+
data.tar.gz: b7fd3c3066cfaa3091504dec91c3321eb01e4769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543f0f7d750bed07a35bb4e783dbae895157710d7f1bcd97675f3995f24a49e4853f9a2d3b37469e9846d00072c1a139f4de3f82f1c7f70a31c2d47e9350d6fe
|
7
|
+
data.tar.gz: c4c2bb21e50ab34a7f74fce8476684546247ef80877ae68b54f48772f2fae4f39bcac6911b1513253e40df5bb26ac6e145046256d3ad25e6f340e6d87b8b457c
|
data/lib/traceur_compiler.rb
CHANGED
@@ -26,7 +26,11 @@ module TraceurCompiler
|
|
26
26
|
};
|
27
27
|
stubs
|
28
28
|
@context.exec <<-compile
|
29
|
-
compile = function (contents) {
|
29
|
+
compile = function (contents, options) {
|
30
|
+
for (var key in options) {
|
31
|
+
traceur.options[key] = options[key];
|
32
|
+
}
|
33
|
+
|
30
34
|
var project = new traceur.semantics.symbols.Project(''),
|
31
35
|
reporter = new traceur.util.ErrorReporter();
|
32
36
|
reporter.reportMessageInternal = function (location, format, args) {
|
@@ -43,9 +47,9 @@ module TraceurCompiler
|
|
43
47
|
end
|
44
48
|
|
45
49
|
class << self
|
46
|
-
def compile(script)
|
50
|
+
def compile(script, options = {})
|
47
51
|
script = script.read if script.respond_to?(:read)
|
48
|
-
Source.context.call("compile", script)
|
52
|
+
Source.context.call("compile", script, options)
|
49
53
|
end
|
50
54
|
end
|
51
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traceur-compiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
@@ -87,8 +87,9 @@ extensions: []
|
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
89
|
- lib/traceur_compiler.rb
|
90
|
-
homepage:
|
91
|
-
licenses:
|
90
|
+
homepage: https://github.com/jakub-/ruby-traceur-compiler
|
91
|
+
licenses:
|
92
|
+
- New BSD license
|
92
93
|
metadata: {}
|
93
94
|
post_install_message:
|
94
95
|
rdoc_options: []
|