Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile producing empty output #10

Open
kikonen opened this issue Jul 10, 2016 · 1 comment
Open

compile producing empty output #10

kikonen opened this issue Jul 10, 2016 · 1 comment

Comments

@kikonen
Copy link

kikonen commented Jul 10, 2016

Noticed when tried to use typescript-rails, actual issue is apparently within this gem.

typescript-ruby/typescript-rails#42

Based into documentation (https://www.typescriptlang.org/docs/handbook/compiler-options.html), "--out" options is deprecated and should use "--outFile". Did quick hack to test that, and didn't notice any change in behavior (output_js still became empty, and "/tmp" appears to contain generated temp files instead).

@kikonen
Copy link
Author

kikonen commented Jul 10, 2016

Seems to work with following patch

module TypeScript
  module Node
...
      def compile_file(source_file, *tsc_options)
...
#          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)
...

Issue occurred when using command line options

[
  '--target', 'ES5',
  '--noImplicitAny',
  '--module', 'system',
  ]

arnvald added a commit to Kaligo/typescript-node-ruby that referenced this issue Aug 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant