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
- .js_content ⇒ String
- .js_path ⇒ Pathname
- .license_path ⇒ Pathname
- .package_info ⇒ Hash
- .package_json_path ⇒ Pathname
- .tsc_path ⇒ Pathname
- .typescript_path ⇒ Pathname
- .version ⇒ String
Class Method Details
.js_content ⇒ String
36 37 38 |
# File 'lib/typescript-src.rb', line 36 def js_content js_path.read end |
.js_path ⇒ Pathname
19 20 21 |
# File 'lib/typescript-src.rb', line 19 def js_path typescript_path.join('bin/typescript.js') end |
.license_path ⇒ Pathname
29 30 31 |
# File 'lib/typescript-src.rb', line 29 def license_path typescript_path.join('LICENSE.txt') end |
.package_info ⇒ Hash
41 42 43 |
# File 'lib/typescript-src.rb', line 41 def package_info JSON.parse(package_json_path.read) end |
.package_json_path ⇒ Pathname
24 25 26 |
# File 'lib/typescript-src.rb', line 24 def package_json_path typescript_path.join('package.json') end |
.tsc_path ⇒ Pathname
14 15 16 |
# File 'lib/typescript-src.rb', line 14 def tsc_path typescript_path.join('bin/tsc') end |
.typescript_path ⇒ 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 |
.version ⇒ String
46 47 48 |
# File 'lib/typescript-src.rb', line 46 def version package_info['version'] end |