darkroom 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +92 -0
- data/LICENSE +1 -1
- data/README.md +430 -114
- data/VERSION +1 -1
- data/lib/darkroom/asset.rb +176 -164
- data/lib/darkroom/darkroom.rb +140 -149
- data/lib/darkroom/delegate.rb +204 -161
- data/lib/darkroom/delegates/{css.rb → css_delegate.rb} +1 -0
- data/lib/darkroom/delegates/{html.rb → html_delegate.rb} +4 -3
- data/lib/darkroom/delegates/{htx.rb → htx_delegate.rb} +3 -2
- data/lib/darkroom/delegates/{javascript.rb → javascript_delegate.rb} +9 -8
- data/lib/darkroom/errors/asset_error.rb +6 -17
- data/lib/darkroom/errors/asset_not_found_error.rb +4 -8
- data/lib/darkroom/errors/circular_reference_error.rb +4 -8
- data/lib/darkroom/errors/duplicate_asset_error.rb +7 -16
- data/lib/darkroom/errors/invalid_path_error.rb +5 -14
- data/lib/darkroom/errors/missing_library_error.rb +7 -16
- data/lib/darkroom/errors/processing_error.rb +13 -20
- data/lib/darkroom/errors/unrecognized_extension_error.rb +4 -8
- data/lib/darkroom/version.rb +1 -1
- data/lib/darkroom.rb +8 -6
- metadata +36 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6ac679135bef28a77e6bd0df80d65d9fff5af142fa5ed928a97355ed02e8488
|
4
|
+
data.tar.gz: 77d7593cc83a00dc06d6e4eda009837707f5912b0b6fff0ee43e4056193cfc27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0eda914cb475f656410c2d25188726c4e3697ba11e5877810c14dcf2639ae3340a77ba8982a1b0ebf86d2f9570ebb1cf01e756983fdd591fa6bf23eb3ad65b
|
7
|
+
data.tar.gz: bef29d0cfea183be2350772684c64baea0d2ee2751f46759d7ea540a2a9e46c61eef1a4c441c80cff201f46e10c85a25f602da18b486bde6b9127ed878f21864
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# Darkroom Changelog
|
2
|
+
|
3
|
+
## Upcoming (Unreleased)
|
4
|
+
|
5
|
+
* Nothing yet
|
6
|
+
|
7
|
+
## 0.0.10 (2025 February 19)
|
8
|
+
|
9
|
+
* Include a few more instance variables in `Asset#inspect`
|
10
|
+
* **Require Ruby 3.0.0 or later**
|
11
|
+
* Make ProcessingError enumerable
|
12
|
+
* **Ensure import and reference regexes have the required named captures**
|
13
|
+
* Gracefully handle invalid reference entities
|
14
|
+
* **Fix delegate finalize library not getting required**
|
15
|
+
|
16
|
+
## 0.0.9 (2025 January 21)
|
17
|
+
|
18
|
+
* **Remove deprecated delegate creation via hash and associated accessors**
|
19
|
+
* **Remove deprecated `:minified_pattern` option**
|
20
|
+
* **Remove deprecated `:internal_pattern` option and `Asset#internal?` method**
|
21
|
+
* **Fix assets with error(s) not getting reprocessed until directly modified**
|
22
|
+
* Add support for AVIF assets
|
23
|
+
* Add support for animated PNG assets
|
24
|
+
* Add support for GIF assets
|
25
|
+
* Add support for WebP assets
|
26
|
+
|
27
|
+
## 0.0.8 (2023 July 15)
|
28
|
+
|
29
|
+
* **Fix issues with ensuring previous steps of asset processing**
|
30
|
+
* **Fix ordering of JavaScript import statements in IIFE output**
|
31
|
+
|
32
|
+
## 0.0.7 (2023 July 15)
|
33
|
+
|
34
|
+
* **Add option to use IIFEs for JavaScript assets instead of concatenating**
|
35
|
+
* Add line info to `ProcessingError#to_s` output for non-`AssetError` errors
|
36
|
+
* Raise error in `Darkroom#dump` if present from last process run
|
37
|
+
* Yield to parse handlers and accumulate errors in order of appearance
|
38
|
+
* Add deprecation warning to `Asset#internal?`
|
39
|
+
* **Add support for importing and referencing assets by relative path**
|
40
|
+
* Escape quotes with HTML entities in reference content with UTF8 format
|
41
|
+
* **Implement DSL for delegates and deprecate configuring via hash**
|
42
|
+
* Move delegate registration back to `Darkroom` class
|
43
|
+
* Rework asset processing code to reduce chances of asset dependency bugs
|
44
|
+
* **Deprecate `:minified_pattern` and replace with more flexible `:minified`**
|
45
|
+
* **Deprecate `:internal_pattern` and replace with more flexible `:entries`**
|
46
|
+
* Skip exception raise in `Darkroom#process!` if processing was skipped
|
47
|
+
* Allow compiled assets to be further processed as target content type
|
48
|
+
* Ensure pristine files are never treated as internal
|
49
|
+
* Move delegate registration and management to Asset class
|
50
|
+
|
51
|
+
## 0.0.6 (2022 May 3)
|
52
|
+
|
53
|
+
* Use [Terser](https://github.com/ahorek/terser-ruby) instead of
|
54
|
+
[UglifyJS](https://github.com/lautis/uglifier) for JavaScript minification
|
55
|
+
* **Fix dependencies sometimes getting missed due to circular references**
|
56
|
+
|
57
|
+
## 0.0.5 (2022 March 31)
|
58
|
+
|
59
|
+
* Ensure load paths are absolute and fully normalized
|
60
|
+
* **Ensure a dependency has been processed before fetching its dependencies**
|
61
|
+
* **Remove deprecated `Asset.add_spec` and `Asset.spec` methods**
|
62
|
+
|
63
|
+
## 0.0.4 (2021 August 3)
|
64
|
+
|
65
|
+
* **Add ability to reference other asset paths and content within an asset**
|
66
|
+
* Ensure `FileUtils` is loaded when dumping assets to disk
|
67
|
+
* **Add `Asset#image?` for determining if an asset is an image**
|
68
|
+
* **Add `Asset#font?` for determining if an asset is a font**
|
69
|
+
* **Add `Asset#binary?` for determining if an asset is binary**
|
70
|
+
* Ensure errors array always exists on `Darkroom` instances
|
71
|
+
* Improve error class organization, naming, and messages
|
72
|
+
* **Use text/javascript for content type of JavaScript and HTX files**
|
73
|
+
* Disallow troublesome characters in asset paths
|
74
|
+
* Add support for JSON assets
|
75
|
+
|
76
|
+
## 0.0.3 (2021 March 27)
|
77
|
+
|
78
|
+
* Fix and improve quote matching in dependency regexes
|
79
|
+
* Use [SassC](https://github.com/sass/sassc-ruby) for minifying CSS since it is more up to date than
|
80
|
+
[CSSminify](https://github.com/matthiassiegel/cssminify)
|
81
|
+
* Fix HTML spec to recognize .htm extensions in addition to .html
|
82
|
+
|
83
|
+
## 0.0.2 (2021 March 25)
|
84
|
+
|
85
|
+
* Improve output of compile and minify library load errors
|
86
|
+
* **Rework how assets are processed so circular dependencies work properly**
|
87
|
+
* **Add methods for getting subresource integrity string for an asset**
|
88
|
+
* **Remove `Darkroom#asset_path!` and move its behavior to `#asset_path`**
|
89
|
+
|
90
|
+
## 0.0.1 (2021 February 25)
|
91
|
+
|
92
|
+
* Release initial gem
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright 2021-
|
1
|
+
Copyright 2021-2025 Nate Pickens
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
4
4
|
documentation files (the "Software"), to deal in the Software without restriction, including without
|