Sha256: 72dd286316158f1d26df387bb7b86c85fc83aa2eca4ff4567ad36f5fdfff4e59

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

# Boot Sequence

include KLog::Logging

CONFIG_KEY = :openai_101

log.kv 'working folder', Dir.pwd

KConfig.configure do |config|
  config.handlebars.defaults.add_all_defaults
end

def k_builder
  @k_builder ||= KBuilder::BaseBuilder.init(KConfig.configuration(CONFIG_KEY))
end

KConfig.configure(CONFIG_KEY) do |config|
  builder_folder    = Dir.pwd
  base_folder       = File.expand_path('../', builder_folder)
  global_template   = File.expand_path('~/dev/kgems/k_templates/templates')

  config.template_folders.add(:global_template    , global_template)
  config.template_folders.add(:template           , File.expand_path('.templates', Dir.pwd))

  config.target_folders.add(:app                  , base_folder)
  config.target_folders.add(:builder              , builder_folder)
end

KConfig.configuration(CONFIG_KEY).debug

area = KManager.add_area(CONFIG_KEY)
resource_manager = area.resource_manager
resource_manager
  .fileset
  .glob('*.rb', exclude: ['boot.rb'])
  .glob('generators/**/*.rb')
resource_manager.add_resources

KManager.boot

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
openai_101-1.2.8 .builders/boot.rb
openai_101-1.2.7 .builders/boot.rb
openai_101-1.2.6 .builders/boot.rb
openai_101-1.2.5 .builders/boot.rb
openai_101-1.2.4 .builders/boot.rb
openai_101-1.2.3 .builders/boot.rb
openai_101-1.2.2 .builders/boot.rb
openai_101-1.2.1 .builders/boot.rb
openai_101-1.2.0 .builders/boot.rb
openai_101-0.2.0 .builders/boot.rb
openai_101-0.1.0 .builders/boot.rb
openai_101-0.0.2 .builders/boot.rb