Module: TypeScript::Src

Defined in:
lib/typescript-src.rb,
lib/typescript-src/version.rb

Constant Summary collapse

VERSION =

TypeScript compiler version + gem’s revision

'1.0.1.2'

Class Method Summary collapse

Class Method Details

.js_contentString

Returns:

  • (String)


36
37
38
# File 'lib/typescript-src.rb', line 36

def js_content
  js_path.read
end

.js_pathPathname

Returns:

  • (Pathname)


19
20
21
# File 'lib/typescript-src.rb', line 19

def js_path
  typescript_path.join('bin/typescript.js')
end

.license_pathPathname

Returns:

  • (Pathname)


29
30
31
# File 'lib/typescript-src.rb', line 29

def license_path
  typescript_path.join('LICENSE.txt')
end

.package_infoHash

Returns:

  • (Hash)


41
42
43
# File 'lib/typescript-src.rb', line 41

def package_info
  JSON.parse(package_json_path.read)
end

.package_json_pathPathname

Returns:

  • (Pathname)


24
25
26
# File 'lib/typescript-src.rb', line 24

def package_json_path
  typescript_path.join('package.json')
end

.tsc_pathPathname

Returns:

  • (Pathname)


14
15
16
# File 'lib/typescript-src.rb', line 14

def tsc_path
  typescript_path.join('bin/tsc')
end

.typescript_pathPathname

Returns:

  • (Pathname)


9
10
11
# File 'lib/typescript-src.rb', line 9

def typescript_path
  @typescript_path ||= ::Pathname.new(File.dirname(__FILE__)).join('typescript-src/support/typescript')
end

.versionString

Returns:

  • (String)


46
47
48
# File 'lib/typescript-src.rb', line 46

def version
  package_info['version']
end