module Jekyll::Typescript::Config

module adding methods to access the config variables for this plugin from the users _config.yml.

these methods are also expected to attach the default values for these options should they be unassigned.

Public Instance Methods

cache_enabled?() click to toggle source
# File lib/jekyll/typescript/config.rb, line 28
def cache_enabled?
  if @cache_enabled.nil?
    @cache_enabled = config.fetch('cache', true)
  end

  @cache_enabled
end
copy_extensions() click to toggle source
# File lib/jekyll/typescript/config.rb, line 16
def copy_extensions
  @copy_extensions ||= Array(config['copy_ext'])
end
temp_dir() click to toggle source
# File lib/jekyll/typescript/config.rb, line 20
def temp_dir
  @temp_dir ||= config['temp_dir'] || '.typescript'
end
ts_extensions() click to toggle source
# File lib/jekyll/typescript/config.rb, line 12
def ts_extensions
  @ts_extensions ||= Array(config['extensions'] || %w[.ts .tsx])
end
tsc_command() click to toggle source
# File lib/jekyll/typescript/config.rb, line 24
def tsc_command
  @tsc_command ||= Array(config['command'] || ['tsc'])
end

Private Instance Methods

config() click to toggle source
# File lib/jekyll/typescript/config.rb, line 38
def config
  @config ||= site.config['typescript'] || {}
end