We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cd0a28 commit 535e08fCopy full SHA for 535e08f
lib/typescript-src.rb
@@ -7,7 +7,15 @@ module Src
7
class << self
8
# @return [Pathname]
9
def typescript_path
10
- @typescript_path ||= ::Pathname.new(File.dirname(__FILE__)).join('typescript-src/support/typescript')
+ unless @typescript_path
11
+ begin
12
+ @typescript_path = ::Pathname.new(`npm root -g`.strip! + '/typescript')
13
+ rescue
14
+ @typescript_path = ::Pathname.new(File.dirname(__FILE__)).join('typescript-src/support/typescript')
15
+ end
16
17
+
18
+ @typescript_path
19
end
20
21
lib/typescript-src/version.rb
@@ -1,5 +1,5 @@
1
module TypeScript
2
module Src
3
- VERSION = '1.0.1.2' # TypeScript compiler version + gem's revision
+ VERSION = '1.0.1.3' # TypeScript compiler version + gem's revision
4
5
0 commit comments