From 6dec35ddf5aa30ce10bd7785bc5f082b41e43df8 Mon Sep 17 00:00:00 2001 From: Arnvald Date: Sun, 13 Aug 2017 17:19:40 +0800 Subject: [PATCH 1/2] Fixed generating output Following @kikonen sollution: https://github.com/typescript-ruby/typescript-node-ruby/issues/10 --- lib/typescript-node.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/typescript-node.rb b/lib/typescript-node.rb index 7d561ba..2a7893e 100644 --- a/lib/typescript-node.rb +++ b/lib/typescript-node.rb @@ -23,8 +23,10 @@ def tsc(*args) # @return [TypeScript::Node::CompileResult] compile result def compile_file(source_file, *tsc_options) Dir.mktmpdir do |output_dir| - output_file = File.join(output_dir, 'out.js') - stdout, stderr, exit_status = tsc(*tsc_options, '--out', output_file, source_file) + #output_file = File.join(output_dir, 'out.js') + #stdout, stderr, exit_status = tsc(*tsc_options, '--out', output_file, source_file) + output_file = source_file.sub(/\.ts\z/, '.js') + stdout, stderr, exit_status = tsc(*tsc_options, source_file) output_js = File.exist?(output_file) ? File.read(output_file) : nil CompileResult.new( From 8caaec79165e8de25bd4cc8f9b6d833649448b83 Mon Sep 17 00:00:00 2001 From: Stanley Gunawan Date: Tue, 22 Aug 2017 10:28:13 +0800 Subject: [PATCH 2/2] Update typescript version to v2.4.2 --- lib/typescript-node/version.rb | 2 +- typescript-node.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/typescript-node/version.rb b/lib/typescript-node/version.rb index e4cf9ea..e3e7fd0 100644 --- a/lib/typescript-node/version.rb +++ b/lib/typescript-node/version.rb @@ -1,5 +1,5 @@ module TypeScript module Node - VERSION = '1.6.2' + VERSION = '2.4.2' end end diff --git a/typescript-node.gemspec b/typescript-node.gemspec index 15897e2..860eed0 100644 --- a/typescript-node.gemspec +++ b/typescript-node.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |gem| gem.require_paths = ["lib"] gem.version = TypeScript::Node::VERSION - gem.add_dependency 'typescript-src', '~> 1.6.2' + gem.add_dependency 'typescript-src', '~> 2.4.2' gem.add_development_dependency 'rake' gem.required_ruby_version = '>= 1.9.3'