File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,15 @@ module Src
77 class << self
88 # @return [Pathname]
99 def typescript_path
10- @typescript_path ||= ::Pathname . new ( File . dirname ( __FILE__ ) ) . join ( 'typescript-src/support/typescript' )
10+ 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+ end
17+
18+ @typescript_path
1119 end
1220
1321 # @return [Pathname]
Original file line number Diff line number Diff line change 11module TypeScript
22 module Src
3- VERSION = '1.0.1.2 ' # TypeScript compiler version + gem's revision
3+ VERSION = '1.0.1.3 ' # TypeScript compiler version + gem's revision
44 end
55end
You can’t perform that action at this time.
0 commit comments