lib/frontman/bootstrapper.rb in frontman-ssg-0.0.2 vs lib/frontman/bootstrapper.rb in frontman-ssg-0.0.3

- old
+ new

@@ -1,9 +1,10 @@ # frozen_string_literal: true # typed: ignore +require 'dotenv' require 'sorbet-runtime' require 'frontman/app' require 'frontman/resource' module Frontman @@ -24,16 +25,14 @@ end sig { params(app: Frontman::App).returns(Frontman::App) } def bootstrap_app(app) unless bootstrapped? + Dotenv.load register_default_helpers(app) - config_path = Frontman::Config.get( - :config_path, - fallback: './config.rb' - ) - app.run(File.read(config_path)) if File.exist?(config_path) + config = Frontman::Config.get(:config_path, fallback: './config.rb') + app.run(File.read(config)) if File.exist?(config) @@bootstrapped = true end app