Skip to content

Conversation

@jonrandahl
Copy link
Contributor

Improves asset management and updates dependencies to address end-of-life status for Ruby Sass.

Added

  • feat(engine): Introduces propshaft asset pipeline support, ensuring compatibility with rails 8+ alongside existing sprockets support.
  • feat(engine): Adds asset paths for gem dependencies.
  • feat(styles): Adds a help target in the makefile to list available commands.

Changed

  • refactor(styles): replaces sass-rails with dartsass-rails as the primary scss compiler dependency.
  • refactor(styles): Modifies the scss entrypoint to contain only internal common styles imports, requiring host applications to import framework dependencies.
  • chore(assets): Updates app/assets/config/manifest.js to remove an incorrect stylesheet directory link and duplicate build references.
  • refactor(config): Conditionally configures assets based on pipeline availability, enabling operation in both sprockets and propshaft environments.
  • chore(view): Replaces favicon links with a partial.
  • refactor(config): Simplifies class joining.
  • chore(dummy): Removes deprecated timezone config.
  • chore(build): Refactors makefile for clearer gem building process.
  • chore(makefile): Updates make targets and adds help.
  • fix(test): Adds sprockets-rails for the test application.
  • chore: Updates bin/rails for gem development.

Fixed

  • refactor(assets): Clarifies asset dependency structure through updated documentation in the scss entrypoint.
  • refactor(assets): Removes misleading configuration directives that conflicted with host application asset compilation.

Other changes

  • chore: Updates version to 2.4.0-beta.
  • chore(styles): Moves header style file.
  • chore: Adds comprehensive .gitignore file.
  • docs: Updates changelog.

- Introduces a detailed .gitignore file to exclude unnecessary files and directories from version control.
- Includes configurations for Ruby, macOS, Linux, and Windows environments.
- Improves repository cleanliness and reduces unnecessary storage.
- Replaces sass-rails with dartsass-rails due to EOL.
- Updates the gemfile and gemspec files accordingly.
- Removes sass-rails dependency.
- Updates the `bin/rails` file to follow current best practices
- Ensures full Rails functionality is available during gem development/testing.
- Includes explanation of all rails component inclusion.
- Introduces `dartsass-rails` to replace `ruby-sass` which is now end-of-life.
- This ensures continued support for Sass compilation within the application.
- Updates header style file location to align with other partials.
- Extracts favicon related links into a partial.
- Improves maintainability of the application layout.
- Reduces duplication of favicon declarations.
- Updates stylesheet structure for compatibility with Propshaft.
- Removes redundant imports from lr-common.scss.
- Organises imports in lr_common_styles.scss for clarity.
- Uses `presence&.join(' ')` for more concise and readable code.
- Improves code clarity and maintainability by using modern Ruby syntax.
- Removes the `active_support.to_time_preserves_timezone` configuration from the dummy application.
- Configures the Rails engine to include asset paths from gem dependencies.
- Ensures that stylesheet assets from gems like govuk_template, govuk_elements_rails, bootstrap-sass, font-awesome-rails and govuk_frontend_toolkit are discoverable by the asset pipeline.
- Logs a debug message in development if a gem's asset path cannot be added, preventing errors if a gem is not present.
- Modifies asset precompilation logic to only execute when Sprockets is available.
- Prevents errors in Rails 8+ which use Propshaft by default and no longer have `config.assets`.
- Improves compatibility across different Rails versions and asset pipeline configurations.
- Tidies up unused asset reference to the `lr_common_styles` stylesheet from the asset manifest aligning with updates related to Ruby Sass deprecation and end-of-life
- Clarifies asset loading instructions for both Sprockets and Propshaft, promoting a consistent approach.
- Removes framework dependency imports from the common styles file, instead requiring host applications to manage these dependencies.
- Explains the automatic registration of asset paths, ensuring discoverability within host applications.
- Adds `sprockets-rails` gem to the test dummy application.
- Resolves a dependency issue in the test environment, ensuring proper asset compilation and functionality during testing.
- This change is necessary to maintain the integrity of the test suite following updates to related dependencies.
- Updates and clarifies Makefile targets for gem building, testing and publishing.
- Adds a `help` target to display available make commands and environment variables.
- Renames and adds descriptions for each other target.
- Updates the gem version to reflect pre-release status.
- This change is due to ongoing modifications and the need for beta testing.
- Updates the `lr_common_styles` gem to version 2.4.0.beta.
- This is to test compatibility issues arising from the end-of-life for Ruby Sass.
- Updates the `build` target to explicitly signal that it is an alias for the `gem` target.
- Modifies the `gem` target to directly use `gem build` command with the `.spec` file, ensuring correct gem package creation.
- Clarifies output messages for the `build` target.
- Introduces Propshaft asset pipeline support, ensuring compatibility with Rails 8+.
- Registers framework gem asset paths automatically within the engine initialiser.
- Replaces `sass-rails` with `dartsass-rails` as the primary SCSS compiler.
- Refactors the SCSS entrypoint to streamline Common Styles imports.
- Includes a `help` target in the Makefile to list available commands.
- Updates the test dummy app configuration for Propshaft/Sprockets compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants