Assets management for Ruby web applications
- Drop support for Ruby 3.0
- [Tim Riley] Require a
root:
argument when initializingHanami::Assets
. This should be the directory containing the compiled assets and theirassets.json
manifest file. - [Tim Riley] Removed
manifest_path
setting; the manifest path is no longer user-configurable. - [Tim Riley] Replaced
package_manager_run_command
setting withnode_command
setting. - [Tim Riley] Removed unused
sources
,entry_point_patterns
anddestination
settings. - [Tim Riley] Removed
bin/hanami-assets
executable.
- [Luca Guidi] Official support for Ruby: Ruby 3.1, and 3.2
- [Luca Guidi] Drop support for Ruby: MRI 2 and JRuby
- [Luca Guidi] This gem now requires a working Node and Yarn installation
- [Tim Riley] Changed the gem to load using Zeitwerk, via
require "hanami/assets"
- [Tim Riley] Changed
Hanami::Assets
to a class, initialized with aHanami::Assets::Config
(see below) and providing a#[]
method returning aHanami::Assets::Asset
instance per asset. - [Tim Riley] Moved
Hanami::Assets::Helpers
toHanami::Helpers::AssetsHelper
in the hanami gem (along with various helper methods renamed; see the hanami CHANGELOG for details) - [Luca Guidi] Renamed
Hanami::Assets::Configuration
toConfig
- [Luca Guidi] Removed
Hanami::Assets.configure
, useHanami::Assets::Config.new
- [Luca Guidi] Removed
Hanami::Assets.deploy
,.precompile
,.load!
as precompile process is now handled via JavaScript - [Luca Guidi] Removed
Hanami::Assets.sources
, as third-party libraries should be handled via Yarn - [Luca Guidi] Removed
Hanami::Assets::Config#fingerprint
, as fingerprinting will be always activated - [Luca Guidi] Changed
Hanami::Assets::Config#subresource_integrity
. To activate the feature, pass an array of algorithms to use (e.g.config.subresource_integrity = ["sha-384"]
) - [Luca Guidi] Removed
Hanami::Assets::Config#cdn
. To activate the feature, pass the CDN base URL to the initializer of the configuration (base_url
keyword argument). - [Luca Guidi] Removed
Hanami::Assets::Config#javascript_compressor
andstylesheet_compressor
, as the compression is now handled via JavaScript - [Luca Guidi] Removed
Hanami::Assets::Config#scheme
,#host
,#port
, and#prefix
. Usebase_url
keyword argument to pass to configuration initializer - [Luca Guidi] Removed
Hanami::Assets::Config#root
,#public_directory
,#destination_directory
, and#manifest
as they will now looked up via conventions - [Luca Guidi] Moved
Hanami::Assets::Precompiler
andWatcher
tohanami-cli
- [Luca Guidi] Official support for Ruby: MRI 3.0
- [Luca Guidi] Official support for Ruby: MRI 2.7
- [unleashy] Precompile assets using binary mode to ensure compatibility with Windows
- [Landon Grindheim] Lazily load
sassc
only when required - [Landon Grindheim] Ensure assets precompilation to not crash when SASS stylesheet doesn't have dependencies
- [Landon Grindheim & Sean Collins] Added support for
sassc
gem, becausesass
is no longer maintained
- [Luca Guidi] Official support for Ruby: MRI 2.6
- [Luca Guidi] Support
bundler
2.0+
- [Luca Guidi] Make optional nested assets feature to maintain backward compatibility with
1.2.x
- [Paweł Świątkowski] Preserve directory structure of assets at the precompile time.
- [Luca Guidi] Official support for JRuby 9.2.0.0
- [Luca Guidi] Collect assets informations for Early Hints (103)
- [Luca Guidi] Send automatically javascripts and stylesheets via Push Promise / Early Hints
- [Luca Guidi] Add the ability to send audio, video, and generic assets for Push Promise / Early Hints
- [Luca Guidi] Official support for Ruby: MRI 2.5
- [Malina Sulca] Print
href
andsrc
first in output HTML
- [Luca Guidi] Don't let
#javascript
and#stylesheet
helpers to append file extension if the URL contains a query string
- [Luca Guidi] Official support for Ruby: MRI 2.4
- [Luca Guidi] Ensure
NullManifest
to be pretty printable
- [Luca Guidi] Official support for Ruby: MRI 2.3+ and JRuby 9.1.5.0+
- [Sean Collins] Rename digest into fingerprint
- [Matthew Gibbons & Sean Collins] Subresource Integrity (SRI)
- [Matthew Gibbons & Sean Collins] Allow
javascript
andstylesheet
helpers to accept a Hash representing HTML attributes. Eg.<%= javascript 'application', async: true %>
- [Alexander Gräfe] Safely precompile assets from directories with a dot in their name.
- [Luca Guidi] Detect changes for Sass/SCSS dependencies.
- [Maxim Dorofienko & Luca Guidi] Preserve static assets under public directory, by removing only assets directory and manifest at the precompile time.
– [Luca Guidi] Drop support for Ruby 2.0 and 2.1. Official support for JRuby 9.0.5.0+.
- [Luca Guidi] Don't create digest version of files under public directory, but only for precompiled files.
- [Derk-Jan Karrenbeld] Don't precompile
.map
files
- [Luca Guidi] Fix recursive Sass imports
- [Luca Guidi] Ensure to truncate assets in public before to precompile/copy them
- [Luca Guidi] Renamed the project
- [Luca Guidi] Configurable assets compressors
- [Luca Guidi] Builtin JavaScript and stylesheet compressors
- [deepj & Michael Deol] Added
Lotus::Assets::Helpers#favicon
- [Leigh Halliday] Added
Lotus::Assets::Helpers#video
- [Kleber Correia] Added
Lotus::Assets::Helpers#audio
- [Gonzalo Rodríguez-Baltanás Díaz] Added
Lotus::Assets::Helpers#image
- [Luca Guidi] Added
Lotus::Assets::Helpers#javascript
and#stylesheet
- [Luca Guidi] Added
Lotus::Assets::Helpers#asset_path
and#asset_url
- [Luca Guidi] "CDN Mode" let helpers to generate CDN URLs (eg.
https://123.cloudfront.net/assets/application-d1829dc353b734e3adc24855693b70f9.js
) - [Luca Guidi] "Digest Mode" let helpers to generate digest URLs (eg.
/assets/application-d1829dc353b734e3adc24855693b70f9.js
) - [Luca Guidi] Added
hanami-assets
command to precompile assets at the deploy time - [Luca Guidi] Added support for third party gems that want to ship gemified assets for Lotus
- [Luca Guidi] Assets preprocessors (eg. Sass, ES6, CoffeeScript, Opal, JSX)
- [Luca Guidi] Official support for Ruby 2.0+