typescript 0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/typescript.rb +10 -2
  2. metadata +5 -5
@@ -11,7 +11,11 @@ module TypeScript
11
11
  end
12
12
 
13
13
  def self.compiler_path
14
- @compiler_path ||= compiler_bundled_path
14
+ @compiler_path ||= ENV['TYPESCRIPT_COMPILER_PATH'] || compiler_bundled_path
15
+ end
16
+
17
+ def self.lib_path
18
+ @lib_path ||= ENV['TYPESCRIPT_LIB_PATH'] || lib_bundled_path
15
19
  end
16
20
 
17
21
  def self.path=(path)
@@ -23,6 +27,10 @@ module TypeScript
23
27
  @contents ||= "#{File.read(path)}\n#{File.read(compiler_path)}"
24
28
  end
25
29
 
30
+ def self.lib_contents
31
+ @lib_contents ||= File.read(lib_path)
32
+ end
33
+
26
34
  def self.version
27
35
  @version ||= '0.8.0'
28
36
  end
@@ -58,7 +66,7 @@ module TypeScript
58
66
  options[:bare] = false
59
67
  end
60
68
 
61
- Source.context.call("RubyTypeScriptCompiler", '', script, options)
69
+ Source.context.call("RubyTypeScriptCompiler", Source.lib_contents, script, options)
62
70
  end
63
71
  end
64
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typescript
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,17 +16,17 @@ dependencies:
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 0.8.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: '0'
29
+ version: 0.8.0.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: execjs
32
32
  requirement: !ruby/object:Gem::Requirement