Add support for dotenv
This commit is contained in:
parent
38a9025560
commit
6440d53e7a
|
@ -9,6 +9,9 @@ end
|
|||
require "middleman-core/load_paths"
|
||||
Middleman.setup_load_paths
|
||||
|
||||
require 'dotenv'
|
||||
::Dotenv.load
|
||||
|
||||
require 'middleman-core'
|
||||
require 'middleman-core/logger'
|
||||
|
||||
|
@ -46,6 +49,8 @@ end
|
|||
|
||||
::Middleman::Logger.singleton(3)
|
||||
::Middleman::Cli.config = ::Middleman::Application.new do
|
||||
#
|
||||
config[:environment] = (ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development').to_sym
|
||||
config[:mode] = :config
|
||||
config[:exit_before_ready] = true
|
||||
config[:watcher_disable] = true
|
||||
|
|
|
@ -10,7 +10,7 @@ module Middleman::Cli
|
|||
|
||||
class_option :environment,
|
||||
aliases: '-e',
|
||||
default: :production
|
||||
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || :production
|
||||
class_option :clean,
|
||||
type: :boolean,
|
||||
default: true,
|
||||
|
|
|
@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency('fast_blank')
|
||||
s.add_dependency('parallel')
|
||||
s.add_dependency('servolux')
|
||||
s.add_dependency('dotenv')
|
||||
|
||||
# Helpers
|
||||
s.add_dependency('activesupport', ['~> 4.2'])
|
||||
|
|
Loading…
Reference in a new issue