hanami-assets 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +22 -0
- data/lib/hanami/assets/compilers/sass.rb +9 -0
- data/lib/hanami/assets/compressors/sass_stylesheet.rb +2 -2
- data/lib/hanami/assets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d57c688cf9558e60dd1d231c9d4af7aa3cc741961598313de174f326d98311e
|
4
|
+
data.tar.gz: a64b0d2fc02ab944bfd44dc29f869a59b47948ce6affca5b81cd95bfe0a50a3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6d37432f52284e19690df0031cf0809f4225961654f9d5c074ddbff3f1a1b8d9016cb07ddfb9e0ccfd139bb31bac8d322912acae0baf8d4270a11895f847438
|
7
|
+
data.tar.gz: 1e3424ed716e9bf166a0bf6728407c03bdb0cb779d865a7f6281b523a62754452e6d893c473fbaff1ce870b4b8de31d823f17b7ec0113045f8e487c25fc1eca1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Hanami::Assets
|
2
2
|
Assets management for Ruby web applications
|
3
3
|
|
4
|
+
## v1.3.3 - 2019-09-13
|
5
|
+
### Fixed
|
6
|
+
- [Landon Grindheim] Lazily load `sassc` only when required
|
7
|
+
- [Landon Grindheim] Ensure assets precompilation to not crash when SASS stylesheet doesn't have dependencies
|
8
|
+
|
4
9
|
## v1.3.2 - 2019-08-02
|
5
10
|
### Added
|
6
11
|
- [Landon Grindheim & Sean Collins] Added support for `sassc` gem, because `sass` is no longer maintained
|
data/README.md
CHANGED
@@ -437,6 +437,28 @@ From now on, helpers will return the absolute URL for the asset, hosted on the C
|
|
437
437
|
<script src="https://123.cloudfront.net/assets/application-d1829dc353b734e3adc24855693b70f9.js" type="text/javascript"></script>
|
438
438
|
```
|
439
439
|
|
440
|
+
## Standalone mode
|
441
|
+
|
442
|
+
If you're using `hanami-assets` without `hanami`, you must explicitly boot the framework with:
|
443
|
+
|
444
|
+
```ruby
|
445
|
+
Hanami::Assets.configure do
|
446
|
+
# ...
|
447
|
+
end.load!
|
448
|
+
```
|
449
|
+
|
450
|
+
or
|
451
|
+
|
452
|
+
```ruby
|
453
|
+
Hanami::Assets.configure do
|
454
|
+
# ...
|
455
|
+
end
|
456
|
+
|
457
|
+
# ...
|
458
|
+
|
459
|
+
Hanami::Assets.load!
|
460
|
+
```
|
461
|
+
|
440
462
|
## Third party gems
|
441
463
|
|
442
464
|
Developers can maintain gems that distribute assets for Hanami. For instance `hanami-ember` or `hanami-jquery`.
|
@@ -16,6 +16,13 @@ module Hanami
|
|
16
16
|
name.to_s =~ EXTENSIONS
|
17
17
|
end
|
18
18
|
|
19
|
+
# @since 1.3.3
|
20
|
+
# @api private
|
21
|
+
def initialize(*)
|
22
|
+
super
|
23
|
+
require 'sassc'
|
24
|
+
end
|
25
|
+
|
19
26
|
private
|
20
27
|
|
21
28
|
# @since 0.3.0
|
@@ -33,6 +40,8 @@ module Hanami
|
|
33
40
|
# @api private
|
34
41
|
def dependencies
|
35
42
|
renderer.dependencies.map(&:filename)
|
43
|
+
rescue source::NotRenderedError
|
44
|
+
[]
|
36
45
|
end
|
37
46
|
|
38
47
|
# @since 1.3.2
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'hanami/assets/compressors/stylesheet'
|
2
|
-
require 'sassc'
|
3
2
|
|
4
3
|
module Hanami
|
5
4
|
module Assets
|
@@ -17,7 +16,8 @@ module Hanami
|
|
17
16
|
# @since 0.1.0
|
18
17
|
# @api private
|
19
18
|
def initialize
|
20
|
-
|
19
|
+
require 'sassc'
|
20
|
+
@compressor = ::SassC::Engine
|
21
21
|
end
|
22
22
|
|
23
23
|
# @since 0.1.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-utils
|