jekyll_picture_tag 1.13.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.envrc +4 -0
  3. data/.github/workflows/code-checks.yml +33 -0
  4. data/.gitignore +3 -0
  5. data/.rubocop.yml +29 -76
  6. data/.ruby-version +1 -1
  7. data/docs/.envrc +2 -0
  8. data/docs/devs/contributing/code.md +14 -4
  9. data/docs/devs/contributing/docs.md +24 -6
  10. data/docs/devs/contributing/setup.md +21 -1
  11. data/docs/devs/contributing/testing.md +19 -37
  12. data/docs/devs/releases.md +45 -4
  13. data/docs/index.md +43 -18
  14. data/docs/logo.png +0 -0
  15. data/docs/logo.svg +880 -0
  16. data/docs/users/configuration/disable.md +1 -1
  17. data/docs/users/configuration/ignore_missing.md +1 -1
  18. data/docs/users/configuration/kramdown_fix.md +1 -1
  19. data/docs/users/configuration/suppress_warnings.md +1 -1
  20. data/docs/users/configuration/urls.md +69 -0
  21. data/docs/users/deployment.md +49 -0
  22. data/docs/users/getting_started.md +55 -0
  23. data/docs/users/installation.md +18 -38
  24. data/docs/users/liquid_tag/argument_reference/crop.md +21 -36
  25. data/docs/users/liquid_tag/examples.md +13 -25
  26. data/docs/users/liquid_tag/index.md +1 -1
  27. data/docs/users/notes/{migration.md → migration_1.md} +1 -1
  28. data/docs/users/notes/migration_2.md +99 -0
  29. data/docs/users/presets/cropping.md +21 -22
  30. data/docs/users/presets/default.md +11 -2
  31. data/docs/users/presets/examples.md +77 -45
  32. data/docs/users/presets/fallback_image.md +1 -1
  33. data/docs/users/presets/html_attributes.md +1 -1
  34. data/docs/users/presets/image_formats.md +3 -3
  35. data/docs/users/presets/image_quality.md +71 -56
  36. data/docs/users/presets/index.md +19 -45
  37. data/docs/users/presets/link_source.md +1 -1
  38. data/docs/users/presets/media_queries.md +1 -1
  39. data/docs/users/presets/nomarkdown_override.md +1 -1
  40. data/docs/users/presets/pixel_ratio_srcsets.md +1 -1
  41. data/docs/users/presets/width_height_attributes.md +1 -1
  42. data/docs/users/presets/width_srcsets.md +61 -23
  43. data/docs/users/presets/writing_presets.md +65 -0
  44. data/docs/users/tutorial.md +97 -0
  45. data/jekyll_picture_tag.gemspec +38 -23
  46. data/lib/jekyll_picture_tag.rb +8 -5
  47. data/lib/jekyll_picture_tag/cache.rb +64 -3
  48. data/lib/jekyll_picture_tag/defaults/global.rb +18 -0
  49. data/lib/jekyll_picture_tag/defaults/presets.rb +57 -0
  50. data/lib/jekyll_picture_tag/images.rb +1 -0
  51. data/lib/jekyll_picture_tag/images/generated_image.rb +25 -60
  52. data/lib/jekyll_picture_tag/images/image_file.rb +105 -0
  53. data/lib/jekyll_picture_tag/images/img_uri.rb +3 -10
  54. data/lib/jekyll_picture_tag/images/source_image.rb +44 -9
  55. data/lib/jekyll_picture_tag/instructions.rb +70 -6
  56. data/lib/jekyll_picture_tag/instructions/children/config.rb +128 -0
  57. data/lib/jekyll_picture_tag/instructions/children/context.rb +24 -0
  58. data/lib/jekyll_picture_tag/instructions/children/params.rb +90 -0
  59. data/lib/jekyll_picture_tag/instructions/children/parsers.rb +48 -0
  60. data/lib/jekyll_picture_tag/instructions/children/preset.rb +182 -0
  61. data/lib/jekyll_picture_tag/instructions/parents/conditional_instruction.rb +69 -0
  62. data/lib/jekyll_picture_tag/instructions/parents/env_instruction.rb +29 -0
  63. data/lib/jekyll_picture_tag/output_formats/basic.rb +5 -17
  64. data/lib/jekyll_picture_tag/parsers.rb +6 -0
  65. data/lib/jekyll_picture_tag/{instructions → parsers}/arg_splitter.rb +1 -1
  66. data/lib/jekyll_picture_tag/parsers/configuration.rb +28 -0
  67. data/lib/jekyll_picture_tag/{instructions → parsers}/html_attributes.rb +1 -1
  68. data/lib/jekyll_picture_tag/parsers/image_backend.rb +33 -0
  69. data/lib/jekyll_picture_tag/parsers/preset.rb +43 -0
  70. data/lib/jekyll_picture_tag/{instructions → parsers}/tag_parser.rb +15 -12
  71. data/lib/jekyll_picture_tag/router.rb +35 -93
  72. data/lib/jekyll_picture_tag/srcsets/basic.rb +4 -10
  73. data/lib/jekyll_picture_tag/utils.rb +10 -20
  74. data/lib/jekyll_picture_tag/version.rb +1 -1
  75. data/readme.md +48 -9
  76. metadata +161 -80
  77. data/.travis.yml +0 -8
  78. data/Dockerfile +0 -9
  79. data/docs/users/configuration/cdn.md +0 -35
  80. data/docs/users/configuration/relative_urls.md +0 -15
  81. data/docs/users/notes/input_checking.md +0 -6
  82. data/jekyll-picture-tag.gemspec +0 -52
  83. data/lib/jekyll-picture-tag.rb +0 -25
  84. data/lib/jekyll_picture_tag/cache/base.rb +0 -59
  85. data/lib/jekyll_picture_tag/cache/generated.rb +0 -20
  86. data/lib/jekyll_picture_tag/cache/source.rb +0 -19
  87. data/lib/jekyll_picture_tag/defaults/global.yml +0 -11
  88. data/lib/jekyll_picture_tag/defaults/presets.yml +0 -11
  89. data/lib/jekyll_picture_tag/instructions/configuration.rb +0 -121
  90. data/lib/jekyll_picture_tag/instructions/preset.rb +0 -122
  91. data/lib/jekyll_picture_tag/instructions/set.rb +0 -75
@@ -2,7 +2,7 @@
2
2
  sort: 3
3
3
  ---
4
4
 
5
- # Writing Presets
5
+ # Presets
6
6
 
7
7
  Presets are named collections of settings that determine basically everything
8
8
  about JPT's output. Think of them like frameworks that you can plug images into;
@@ -14,26 +14,6 @@ the `_data/` directory as well.
14
14
  Any settings which are specific to particular markup formats are documented on
15
15
  their respective markup format page.
16
16
 
17
- ## Required Knowledge
18
-
19
- If you don't know the difference between resolution switching and art direction,
20
- stop now and learn responsive images. Ideally, write a few yourself until you
21
- understand them.
22
-
23
- Here are some good guides:
24
-
25
- * [MDN Responsive Images guide](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images)
26
- * [CSS Tricks Guide to Reponsive Images](https://css-tricks.com/a-guide-to-the-responsive-images-syntax-in-html/)
27
- * [Cloud 4 - Responsive Images 101](https://cloudfour.com/thinks/responsive-images-101-definitions/)
28
-
29
- ## Media Queries
30
-
31
- **Media queries are not presets**, but they are used when writing them. They are
32
- defined in `_data/picture.yml` alongside presets. More information
33
- [here](media_queries).
34
-
35
- ## Presets
36
-
37
17
  _General Format:_
38
18
 
39
19
  ```yaml
@@ -65,37 +45,31 @@ presets:
65
45
  noscript: true
66
46
  ```
67
47
 
68
- Each entry is a pre-defined collection of settings to build a given chunk of
69
- text (usually HTML) and its respective images. You can select one as the first
70
- argument given to the tag:
48
+ ## Media Queries
71
49
 
72
- {% raw %}
73
- `{% picture my-preset image.jpg %}`
74
- {% endraw %}
50
+ **Media queries are not presets**, but they are used when writing them. They are
51
+ defined in `_data/picture.yml` alongside presets. They look like this:
75
52
 
76
- The `default` preset will be used if none is specified. A preset name can't
77
- contain a `.` (period). You can create as many as you like.
53
+ ```yaml
54
+ # _data/picture.yml
78
55
 
79
- ```note
80
- `media_queries` and `presets` used to be called `media_presets` and
81
- `markup_presets`. These names were causing some confusion, so they were
82
- changed. The old names will continue working for the forseeable future, at least
83
- until the next major version update.
56
+ media_queries:
57
+ (name): '(media query)'
58
+ (name): '(media query)'
59
+ (name): '(media query)'
84
60
  ```
85
61
 
86
- ## Markup Format
87
-
88
- The high level, overall markup format is controlled with the `markup:` setting,
89
- documented [here](markup_formats).
62
+ Example:
90
63
 
91
- ## Choosing a Srcset format
92
-
93
- For images that are different sizes on different screens (most images), use a
94
- [width-based srcset](width_srcsets) (which is the default).
64
+ ```yaml
65
+ media_queries:
66
+ full_width: 'min-width: 901px'
67
+ tablet: 'min-width: 601px'
68
+ mobile: 'max-width: 600px'
69
+ ```
95
70
 
96
- Use a [pixel-ratio srcset](pixel_ratio_srcsets) when the image will always be
97
- the same size, regardless of screen width (thumbnails and icons).
71
+ More information [here](media_queries).
98
72
 
99
- ## Settings reference
73
+ ## Reference
100
74
 
101
75
  {% include list.liquid %}
@@ -1,5 +1,5 @@
1
1
  ---
2
- sort: 10
2
+ sort: 12
3
3
  ---
4
4
 
5
5
  # Source Image Link
@@ -1,5 +1,5 @@
1
1
  ---
2
- sort: 1
2
+ sort: 3
3
3
  ---
4
4
 
5
5
  # Media Queries
@@ -1,5 +1,5 @@
1
1
  ---
2
- sort: 11
2
+ sort: 13
3
3
  ---
4
4
 
5
5
  # Nomarkdown Override
@@ -1,5 +1,5 @@
1
1
  ---
2
- sort: 4
2
+ sort: 6
3
3
  ---
4
4
 
5
5
  # Pixel Ratio Srcsets
@@ -1,5 +1,5 @@
1
1
  ---
2
- sort: 7
2
+ sort: 8
3
3
  ---
4
4
 
5
5
  # Width & Height (Anti-Loading-Jank)
@@ -1,19 +1,64 @@
1
1
  ---
2
- sort: 3
2
+ sort: 5
3
3
  ---
4
4
 
5
5
  # Width Based Srcsets
6
6
 
7
- A width based srcset looks like this:
7
+ A width based srcset looks like this:
8
8
 
9
9
  ```html
10
10
  srcset="myimage-800.jpg 800w, myimage-1200.jpg 1200w, myimage-2000.jpg 2000w"
11
11
  ```
12
12
 
13
- It's the default; to use it specify a `widths` setting (or don't, for the
14
- default set), and optionally the `sizes` and `size` settings.
13
+ You should use it when the size of an image depends on the size of the screen used to show it, which
14
+ generally means anything bigger than about 300 pixels. It's the default; to use it specify a
15
+ `widths` setting (or don't, for the default set), and optionally the `sizes` and `size` settings.
15
16
 
16
- ## Widths
17
+ ## A word on sizes
18
+
19
+ The `sizes` attribute is both important, and impossible to offer good defaults for. Web browsers parse
20
+ web pages line-by-line. When they run into an external asset (such as an image) they must download,
21
+ they start that process immediately without waiting to draw the page. This means that at the point
22
+ in time when the browser must decide which image to download, it has no clue how large that image
23
+ will be on the page. The sizes attribute is how we tell it.
24
+
25
+ It doesn't have to be pixel-perfect, just close enough for the browser to make a good choice. You
26
+ can't use % (percentage width of the parent container) for the same reason we have to do this at
27
+ all. If you do not provide it, the web browser will assume the image is 100vw (100% the width of
28
+ the viewport.)
29
+
30
+ ## How to create a sizes attribute
31
+
32
+ First, Load the page and image as they will appear in the final site. (Basically write the rest of
33
+ the preset.)
34
+
35
+ Next, using either dev tools or by manipulating the browser window itself, determine how large the
36
+ image will be for all reasonable screen sizes. Organize this information into CSS measurements
37
+ (using `vw`, `vh`, `px`, `em`, or a calculation based on those units) associated with your
38
+ named CSS media queries, and enter them into the relevant preset. **Order matters**; enter these
39
+ from most to least restrictive. The browser will ignore everything after the first media query it
40
+ finds that is true.
41
+
42
+ **Example:** on my particular site, for screens 900px or smaller, inline images are the width of the
43
+ viewport minus 9px of padding on either side. For screens 901px or larger, they are a constant 862px
44
+ wide. The relevant lines in my config file look like this:
45
+
46
+ ```yml
47
+ media_queries:
48
+ full_width: 'min-width: 901px'
49
+ # (...)
50
+
51
+ presets:
52
+ default:
53
+ # (...)
54
+ sizes:
55
+ full_width: 862px
56
+ size: calc(100vw - 18px)
57
+ ```
58
+
59
+ ## Settings Reference
60
+
61
+ ### Widths
17
62
 
18
63
  _Format:_ `widths: [integer, integer, (...)]`
19
64
 
@@ -23,7 +68,7 @@ _Default_: `[400, 600, 800, 1000]`
23
68
 
24
69
  Array of image widths to generate, in pixels.
25
70
 
26
- ## Media Widths
71
+ ### Media Widths
27
72
 
28
73
  _Format:_
29
74
 
@@ -41,11 +86,11 @@ media_widths:
41
86
 
42
87
  _Default:_ `widths` setting
43
88
 
44
- If you are using art direction, there is no sense in generating desktop-size
45
- files for your mobile image. You can specify sets of widths to associate with
46
- given media queries. If not specified, will use `widths` setting.
89
+ If you are using art direction, there is no sense in generating desktop-size files for your mobile
90
+ image. Similarly, there's no sense in generating 300px wide versions of your ultrawide crop. You can
91
+ specify sets of widths to associate with given media queries.
47
92
 
48
- ## Sizes
93
+ ### Sizes
49
94
 
50
95
  _Format:_
51
96
 
@@ -64,22 +109,15 @@ sizes:
64
109
  desktop: 900px
65
110
  ```
66
111
 
67
- Conditional sizes, used to construct the `sizes=` HTML attribute telling the
68
- browser how wide your image will be (on the screen) when a given media query
69
- is true. CSS dimensions can be given in `px`, `em`, or `vw`. To be used along
70
- with a width-based srcset.
71
-
72
- Provide these in order of most restrictive to least restrictive. The browser
73
- will choose the first one with an applicable media query.
74
-
75
- You don't have to provide a sizes attribute at all. If you don't, the browser
76
- will assume the image is 100% the width of the viewport.
112
+ Conditional sizes, used to construct the `sizes=` HTML attribute telling the browser how wide your
113
+ image will be (on the screen) when a given media query is true. CSS dimensions can be given in `px`,
114
+ `em`, or `vw`. Provide these in order of most restrictive to least restrictive. The browser will
115
+ choose the first one with an applicable media query.
77
116
 
78
- ## Size
117
+ ### Size
79
118
 
80
119
  _Format:_ `size: (CSS Dimension)`
81
120
 
82
121
  _Example:_ `size: 80vw`
83
122
 
84
- Unconditional `sizes` setting, to be supplied either alone or after all
85
- conditional sizes.
123
+ Unconditional `sizes` setting, to be supplied either alone or after all conditional sizes.
@@ -0,0 +1,65 @@
1
+ ---
2
+ sort: 1
3
+ ---
4
+
5
+ # How to write a preset
6
+
7
+ ## 0. Pick a name
8
+
9
+ * Preset names should be a single word, and they can't contain periods.
10
+ * `default` is used when you don't specify one in a liquid tag.
11
+ * Anything beginning with `jpt-` is off limits.
12
+
13
+ ## 1. Pick a Markup Format
14
+
15
+ The high level, overall markup format is controlled with the `markup:` setting, documented
16
+ [here](markup_formats). You probably want the default setting of `auto`, unless you're doing some
17
+ form of post-processing.
18
+
19
+ If you have a lot of images below-the-fold, consider setting up lazy-loading with an appropriate
20
+ javascript library (there are tons) and `data_auto`.
21
+
22
+ ## 2. Choose a srcset format.
23
+
24
+ For images that are different sizes on different screens (most images), use a [width-based
25
+ srcset](width_srcsets) (which is the default). When using this format, it's important to create a
26
+ sizes attribute, documented at the link above.
27
+
28
+ Use a [pixel-ratio srcset](pixel_ratio_srcsets) when the image will always be the same size,
29
+ regardless of screen width (thumbnails, avatars, icons, etc).
30
+
31
+ ## 3. Choose a set of image widths.
32
+
33
+ For width-based srcsets, set `widths:`. For pixel-ratio srcsets, set `base_width:` and
34
+ `pixel_ratios:`. You want 3-6 sizes that cover a wide range of devices.
35
+
36
+ ## 4. Choose a set of image formats.
37
+
38
+ Accomplish this by setting `formats: [format1, format2, etc...]`
39
+
40
+ * `webp` has [broad support](https://caniuse.com/?search=webp) and is an obvious choice.
41
+ * `avif` has [bad](https://caniuse.com/?search=avif) (but improving) support, and for some reason is slow to generate, but gets better
42
+ file sizes than webp.
43
+ * `jp2` is [Apple's baby](https://caniuse.com/?search=jp2).
44
+ * `original` spits out whatever you put in.
45
+
46
+ Order matters; browsers will use the first one they support.
47
+
48
+ * `[webp, original]` is a good compromise of build resources, support, and performance.
49
+ * `[webp, jp2, original]` brings Safari users along for the ride.
50
+ * `[avif, original]` If you don't care about browsers that aren't chrome, or build time.
51
+ * `[avif, webp, jp2, original]` might be overkill, but it keeps everyone happy.
52
+
53
+ ## 5. Consider enabling dimension attributes.
54
+
55
+ This step prevents page reflow on image load (especially when lazy loading), but requires some prep.
56
+
57
+ 1. Make sure your CSS is correct. You need something like `width: 100%` and `height: auto` (which
58
+ is why they aren't turned on by default.) Without this step, you'll get crazy sizes and/or
59
+ stretched images.
60
+ 2. Set `dimension_attributes: true`
61
+
62
+ ## 6. Make any other necessary changes.
63
+
64
+ Look through the options in the sidebar to the left, adjust as required. Note that the `data_*`
65
+ output formats have a few special options, documented on their respective pages.
@@ -0,0 +1,97 @@
1
+ ---
2
+ sort: 3
3
+ ---
4
+
5
+ # Tutorial
6
+
7
+ ## Hello, world!
8
+
9
+ Once you've followed the [installation](installation) instructions, it's a good
10
+ time to make sure we're set up correctly. Drop an image or two in the site root
11
+ (or `source` directory if you [configured it](configuration/directories)), pick
12
+ some page and write the following (substitute the image filename as
13
+ appropriate):
14
+
15
+ {% raw %}
16
+ ```
17
+ {% picture my_image.jpg %}
18
+ ```
19
+ {% endraw %}
20
+
21
+ Build/serve the site and check it out! Your image should be there, and if you inspect it with the
22
+ dev tools you should see an `<img>` tag with a `srcset` attribute. You're officially serving
23
+ responsive images.
24
+
25
+ ## Webp
26
+
27
+ JPT includes several built-in presets and media queries, documented in the
28
+ [examples](presets/examples). They're intended as a starting point and a learning tool, not for
29
+ production use. Don't dig to deeply into that link just yet, try them out first:
30
+
31
+ {% raw %}
32
+ ```
33
+ {% picture jpt-webp my_image.jpg %}
34
+ ```
35
+ {% endraw %}
36
+
37
+ Now instead of a lone `<img>` tag, you get a `<picture>` surrounding two `<source>`s and an `<img>`.
38
+ The first source contains webp images, and the second contains jpgs. Success! Lighthouse is happier
39
+ and happier.
40
+
41
+ ## Alt text
42
+
43
+ Good web developers add alt text. JPT makes this easy:
44
+
45
+ {% raw %}
46
+ ```
47
+ {% picture my_image.jpg --alt Happy Puppy %}
48
+ ```
49
+ {% endraw %}
50
+
51
+ ## Crop
52
+
53
+
54
+ {% raw %}
55
+ ```
56
+ {% picture my_image.jpg 16:9 %}
57
+ ```
58
+ {% endraw %}
59
+
60
+ Feeling cinematic? If you don't like how the image gets cropped, you can adjust it:
61
+
62
+ {% raw %}
63
+ ```
64
+ {% picture my_image.jpg 16:9 center %}
65
+ ```
66
+ {% endraw %}
67
+
68
+ Your options are `attention` (which is the default), `entropy`, and `center`.
69
+
70
+ ## Art Direction
71
+
72
+ (Usually means "Cropping, but only sometimes.")
73
+
74
+ Art direction is tricky to understand; I know it tripped me up for awhile when learning the subject.
75
+ Here's a short explanation, along with a demo: Let's pretend that we have some image which looks
76
+ good on desktop, but on a mobile screen it's hard to see the subject. Resolution isn't the problem,
77
+ the image just needs to be cropped for smaller screens. JPT makes this easy:
78
+
79
+ {% raw %}
80
+ ```
81
+ {% picture my_image.jpg 2:1 jpt-mobile: my_image.jpg 1:1 %}
82
+ ```
83
+ {% endraw %}
84
+
85
+ This tag is pretty complicated, so here's a breakdown in plain english:
86
+ * Use the default preset.
87
+ * use my_image.jpg as the base image.
88
+ * Crop it to a 2:1 aspect ratio.
89
+ * When the media query named 'jpt-mobile' is true, also use my_image.jpg
90
+ * but this time crop it square.
91
+
92
+ Now adjust the browser width. When skinny, you should see a square crop of your image, and when it's
93
+ wide you should see a 2:1 crop of the same image. That's art direction. Note that there's no
94
+ requirement at all for them to be the same image, and you don't have to use JPT to do the cropping.
95
+
96
+ There are several more liquid tag examples [here](liquid_tag/examples) that you may want to look
97
+ over, as well as the [liquid tag instructions](liquid_tag).
@@ -4,43 +4,58 @@ require 'jekyll_picture_tag/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'jekyll_picture_tag'
7
- spec.version = PictureTag::VERSION
8
7
  spec.authors = ['Robert Wierzbowski', 'Brendan Tobolaski',
9
8
  'Robert Buchberger']
10
9
  spec.email = ['robert@buchberger.cc']
11
-
10
+ spec.homepage = 'https://github.com/rbuchberger/jekyll_picture_tag'
11
+ spec.metadata = { 'documentation_uri' =>
12
+ 'https://rbuchberger.github.io/jekyll_picture_tag/' }
13
+ spec.license = 'BSD-3-Clause'
12
14
  spec.summary = 'Easy responsive images for Jekyll.'
13
15
  spec.description = <<-HEREDOC
14
- Jekyll Picture Tag is a liquid tag that adds responsive images to your
15
- Jekyll static site.Jekyll Picture Tag automatically creates resized source
16
- images, is fully configurable, and covers all use cases including art
17
- direction and resolution switching — with a little YAML configuration and a
18
- simple template tag.
16
+ Jekyll Picture Tag adds responsive images to your Jekyll static site. It
17
+ automatically creates resized source images, is fully configurable, and
18
+ covers all use cases, including art direction and resolution switching, with
19
+ a little YAML configuration and a simple template tag.
19
20
  HEREDOC
20
- spec.homepage = 'https://github.com/rbuchberger/jekyll_picture_tag'
21
- spec.license = 'BSD-3-Clause'
22
- spec.require_paths = ['lib']
23
21
 
22
+ spec.version = PictureTag::VERSION
23
+ spec.require_paths = ['lib']
24
24
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
25
- f.match(%r{^(test|spec|features)/})
25
+ f.match(%r{^(test)/})
26
26
  end
27
27
 
28
- spec.required_ruby_version = ['>= 2.5', '< 3']
28
+ spec.required_ruby_version = ['>= 2.6', '< 4.0']
29
+
30
+ # addressable is used to url-encode image filenames.
31
+ spec.add_runtime_dependency 'addressable', '~> 2.6'
32
+ # Jekyll versions older than 4.0 are not supported.
33
+ spec.add_runtime_dependency 'jekyll', '~> 4.0'
34
+ # MIME types are needed for <source> tags' type= attributes.
35
+ spec.add_runtime_dependency 'mime-types', '~> 3.0'
36
+ # objective_elements handles HTML generation.
37
+ spec.add_runtime_dependency 'objective_elements', '~> 1.1'
38
+ # rainbow is used to colorize terminal output.
39
+ spec.add_runtime_dependency 'rainbow', '~> 3.0'
40
+ # ruby-vips interfaces with libvips.
41
+ spec.add_runtime_dependency 'ruby-vips', '~> 2.0.17'
29
42
 
43
+ # libvips handles all image processing operations.
44
+ spec.requirements << 'libvips'
45
+
46
+ # Development dependencies are not installed when using this gem. You can
47
+ # ignore these, unless you are working on JPT itself.
30
48
  spec.add_development_dependency 'bundler', '~> 2.0'
31
- spec.add_development_dependency 'minitest', '~> 5.11'
49
+ spec.add_development_dependency 'minitest', '~> 5.14'
50
+ spec.add_development_dependency 'minitest-rg'
32
51
  spec.add_development_dependency 'mocha', '~> 1.9'
33
- spec.add_development_dependency 'nokogiri', '~> 1.10'
52
+ spec.add_development_dependency 'nokogiri', '~> 1.1'
34
53
  spec.add_development_dependency 'pry'
35
54
  spec.add_development_dependency 'rake', '~> 12.3'
36
- spec.add_development_dependency 'rubocop', '~> 0.8'
37
- spec.add_development_dependency 'simplecov'
55
+ spec.add_development_dependency 'rubocop', '~> 1.7.0'
56
+ spec.add_development_dependency 'rubocop-minitest', '~> 0.10.0'
57
+ spec.add_development_dependency 'rubocop-performance', '~> 1.9.0'
58
+ spec.add_development_dependency 'rubocop-rake', '~> 0.5.0'
59
+ spec.add_development_dependency 'simplecov', '~> 0.20.0'
38
60
  spec.add_development_dependency 'solargraph'
39
-
40
- spec.add_dependency 'addressable', '~> 2.6'
41
- spec.add_dependency 'mime-types', '~> 3.0'
42
- spec.add_dependency 'mini_magick', '~> 4.0'
43
- spec.add_dependency 'objective_elements', '~> 1.1'
44
-
45
- spec.add_runtime_dependency 'jekyll', '< 5'
46
61
  end