lib/jekyll/typescript/tsconfig.rb
# Parse a tsconfig.json JSON object into an array of equivalent commands
# line flags.
#
# For some dumb reason, tsc just outright ignores your tsconfig.json file
# when you're compiling a single file, instead of a project. See issue
# 6591 on Microsoft/Typescript.
#
Parse a tsconfig.json JSON object into an array of equivalent commands
line flags.

For some dumb reason, tsc just outright ignores your tsconfig.json file
when you're compiling a single file, instead of a project. See issue
6591 on Microsoft/Typescript.
Parse a tsconfig . json JSON object into an array of equivalent commands line flags . For some dumb reason tsc just outright ignores your tsconfig . json file when you ' re compiling a single file instead of a project . See issue 6591 on Microsoft / Typescript .
def parse_tsconfig(json)
        args = []
        json['compilerOptions'].each_pair do |option, value|
          flag = "--#{option}"
          case value
          when TrueClass, FalseClass
            args << flag if value
          when String
            args << flag
            args << value
          when Array
            args << flag
            args << value.join(',')
          else
            Jekyll.logger.warn('Typescript',
                               "unknown option type for #{option} of type #{value.class}")
          end
        end
        args
      end
def parse_tsconfig ( json ) args = [ ] json [ 'compilerOptions' ] . each_pair do | option , value | flag = "--#{option}" case value when TrueClass , FalseClass args << flag if value when String args << flag args << value when Array args << flag args << value . join ( ',' ) else Jekyll . logger . warn ( 'Typescript' , "unknown option type for #{option} of type #{value.class}" ) end end args end
Parse a tsconfig.json JSON object into an array of equivalent commands
line flags.
Parse a tsconfig . json JSON object into an array of equivalent commands line flags .
json
<not_specific>