jekyll-gzip 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b905fa5cdcad48ea1837ad36790ba5e969d6d35ca33cea0864b162c55669b2d6
4
- data.tar.gz: f5851beed59f2fb5543e66096b176ce92db8e93f18caf695577c7407cecc348a
3
+ metadata.gz: d86e365ec93b205a8c49378bf879c2331cb87a1f49152a5bee66f98c86c6eb22
4
+ data.tar.gz: 1c907018e1dca4314bfaf82ed2ad030260d27f0a278688af76409bf151a0a7c6
5
5
  SHA512:
6
- metadata.gz: 592ff97255675700baa1788ef4451de5ec4e67f159d75c9cf518348806dfeae7898086f83f788a98a97737a6d166371371d0d9f7c33b28309771288bf3417f95
7
- data.tar.gz: 73b965bd9157b098bdfe11c3e416eb014aaefb78413fb854fcdb4e0d5c140f12db9bef96f3627db5c698a76c4ad21ebc83ff6e2132642a088416f1dc16c0e12b
6
+ metadata.gz: 18fa320d5ae950b63597c6f3a84e8d1799b9342b3d47777e94dce6d8805b328bc749a774a45cedc43f93a91b9e461c30e1a8e5d0f5a21756097fe2f25d7e76ad
7
+ data.tar.gz: ebd5c9f90b6f3bed402113d833fe62fd6dc97b92f5de9b264984f44da24b04bbaf6b674963085160d5807a724647a9175cd1f0ad15c68b984af1352c6a09efcc
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0 / 2018-01-03
4
+
5
+ ### Changed
6
+
7
+ * Only run the post write hook when the environment variable `JEKYLL_ENV` is `production`
8
+
3
9
  ## 1.0.0 / 2018-01-01
4
10
 
5
11
  ### Added
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Phil Nash
3
+ Copyright (c) 2018 Phil Nash
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -10,6 +10,10 @@ Why not just generate those gzip files at build time? And with the maximum compr
10
10
 
11
11
  `Jekyll::Gzip` does just that. Add the gem to your Jekyll application and when you build your site it will generate gzip files for all text based files (HTML, CSS, JavaScript, etc).
12
12
 
13
+ ## Want even more compression?
14
+
15
+ Zlib's gzipping capabilities don't quite squeeze all the compression out of our files that we could want. If you want a slower but better compression algorithm, check out [Jekyll::Zopfli](https://github.com/philnash/jekyll-zopfli).
16
+
13
17
  ## Installation
14
18
 
15
19
  Add this line to your application's Gemfile:
@@ -26,7 +30,9 @@ bundle install
26
30
 
27
31
  ## Usage
28
32
 
29
- Once you have the gem installed, run `bundle exec jekyll build`. In your destination directory (`_site` by default) you will find gzipped files.
33
+ Once you have the gem installed, run `JEKYLL_ENV=production bundle exec jekyll build`. In your destination directory (`_site` by default) you will find gzipped files.
34
+
35
+ `Jekyll::Gzip` only runs when the environment variable `JEKYLL_ENV` is set to `production` as dealing with gzipping files is unnecessary in development mode and just slows down the site build.
30
36
 
31
37
  ### Serving pre-compiled gzip files
32
38
 
@@ -7,5 +7,7 @@ module Jekyll
7
7
  end
8
8
 
9
9
  Jekyll::Hooks.register :site, :post_write do |site|
10
- Jekyll::Gzip::Compressor.new(site).compress
10
+ if ENV["JEKYLL_ENV"] == "production"
11
+ Jekyll::Gzip::Compressor.new(site).compress
12
+ end
11
13
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Gzip
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-gzip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Nash
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-01 00:00:00.000000000 Z
11
+ date: 2018-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.7.3
126
+ rubygems_version: 2.7.4
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Generate gzipped assets and files for your Jekyll site at build time