Sha256: bd6668f811d3bb0c67401c5aa7defcc6e028dfbd2288697aca949bcb17a0d83b

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

Stored size: 543 Bytes

Contents

module Slinky
  module TypescriptCompiler
    Compilers.register_compiler self,
                                :inputs => ["ts"],
                                :outputs => ["js"],
                                :dependencies => [["typescript-node", "~> 1.6.0"]],
                                :requires => ["typescript-node"]

    def TypescriptCompiler::compile s, file
      # Raises an error if node is not available
      TypeScript::Node.check_node

      TypeScript::Node.compile_file(file, '--target', 'ES5').js
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slinky-0.8.3 lib/slinky/compilers/typescript-compiler.rb