From 1c11afd78d4868fbcc98151081e78ff26f4cebfc Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Thu, 15 May 2014 16:28:37 -0500 Subject: [PATCH] Fix #2413 and setup a Jekyll.env. --- lib/jekyll.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 941084d5..26c6e569 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -76,6 +76,15 @@ require 'jekyll-sass-converter' SafeYAML::OPTIONS[:suppress_warnings] = true module Jekyll + + # Public: Tells you which Jekyll environment you are building in so you can skip tasks + # if you need to. This is useful when doing expensive compression tasks on css and + # images and allows you to skip that when working in development. + + def self.env + ENV["JEKYLL_ENV"] || "development" + end + # Public: Generate a Jekyll configuration Hash by merging the default # options with anything in _config.yml, and adding the given options on top. #