stereobooster / jekyll-press

🚨 [deprecated] Minifier plugin for jekyll. Minifies all html, js, css files. Simple just drop it in solution. No Java required
MIT License
148 stars 13 forks source link

Environment variables #6

Closed OliverJAsh closed 11 years ago

OliverJAsh commented 12 years ago

I have two versions of my project: on my local machine and on my production server. I would like Jekyll press to run on my production sever, but not when I am developing on my local machine.

How would this be achieved with jekyll_press?

P.S. you have duplicate repos: jekyll-press and jekyll_press.

stereobooster commented 11 years ago

I see one simple way to do it. Place condition in file where you load gem:

if !ENV['dev']
  require "bundler/setup"
  Bundler.require(:default)
end

or

if !ENV['dev']
  require 'jekyll-press'
end