class HimekuriTsBasic

Public Class Methods

compile() click to toggle source
# File lib/compile.rb, line 12
def self.compile
  # version info
  ruby_version = (RUBY_VERSION).to_s
  ruby_folder_version = ("3.0.0").to_s

  tsc_path = "$HOME/.nvm/versions/node/" + @@node_version + "/bin/tsc".to_s

  typescript_path = tsc_path + " " + "#{File.dirname(__FILE__)}/himekuri.ts".to_s
  stdout_ts, stderr_ts, status_ts = Open3.capture3(typescript_path)

  stdout_ts
  # puts stderr_ts; puts status_ts
end
delete() click to toggle source
# File lib/delete.rb, line 10
def self.delete

  delete_path = "rm -rf " + "#{File.dirname(__FILE__)}/himekuri.js".to_s
  stdout_ts, stderr_ts, status_ts = Open3.capture3(delete_path)

  stdout_ts
  # puts stderr_ts; puts status_ts
end
running() click to toggle source
# File lib/himekurits.rb, line 11
def self.running
  # version info
  version = (HimekuriTs::VERSION).to_s
  himekuri_ts = "himekuri_ts-".to_s + version.to_s

  nodejs_path = "node" + " " + "#{File.dirname(__FILE__) + '/himekuri.js'}".to_s

  stdout_js, stderr_js, status_js = Open3.capture3(nodejs_path)

  stdout_js
  # puts stderr_js; puts status_js
end