Skip to content

Commit

Permalink
Use ccs frontend for the shared assets
Browse files Browse the repository at this point in the history
Use popshaft instead of sprockets for building assets
  • Loading branch information
tim-s-ccs committed Jun 11, 2024
1 parent 236c5f6 commit 96dc7f7
Show file tree
Hide file tree
Showing 35 changed files with 135 additions and 704 deletions.
64 changes: 64 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,80 @@ updates:
schedule:
interval: "weekly"
day: "sunday"

# Group packages into shared PR
groups:
rails:
patterns:
- 'rails'
- 'action*'
- 'active*'

rubocop:
patterns:
- 'rubocop'
- 'rubocop-*'

feature_tests:
patterns:
- 'selenium-webdriver'
- 'cucumber-rails'
- 'database_cleaner'
- 'site_prism'
- 'axe-core-*'

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"

# Group packages into shared PR
groups:
rails:
patterns:
- '@rails/*'
- 'turbolinks'
- 'turbolinks*'
- '@types/rails__ujs'
- '@types/turbolinks'

lint:
patterns:
- 'eslint'
- 'eslint-*'
- '@eslint/*'
- 'stylelint'
- 'stylelint-*'
- '@stylistic/*'
- 'typescript-eslint'
- '@types/eslint__js'

scss:
patterns:
- 'sass'
- 'cssnano'
- 'cssnano-*'
- 'postcss'
- 'postcss-*'

rollup:
patterns:
- '@rollup/*'
- 'rollup'
- 'rollup-*'

frontend:
patterns:
- 'ccs-frontend'
- 'govuk-frontend'

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ COPY --from=build /rails /rails
RUN adduser rails -D --shell /bin/bash

# Own the runtime files for the app
RUN chown -R rails:rails db log storage tmp
RUN chown -R rails:rails db log storage tmp data

# Own the runtime files for ClamAV
RUN chown -R rails:rails /etc/clamav/clamd.conf
Expand Down
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 6.4'

# The original asset pipeline for Rails [https:/rails/sprockets-rails]
gem 'sprockets-rails'
# The modern asset pipeline for Rails [https:/rails/propshaft]
gem 'propshaft'

# Bundle and process CSS [https:/rails/cssbundling-rails]
gem 'cssbundling-rails', '~> 1.4'
Expand Down Expand Up @@ -82,8 +82,6 @@ gem 'cancancan', '~> 3.6.1'

gem 'role_model', '~> 0.8.2'

gem 'sprockets', '>= 3.7.2'

gem 'smarter_csv'

# for date layout and validation
Expand Down Expand Up @@ -113,7 +111,7 @@ gem 'asset_sync', '>= 2.19.1'
gem 'fog-aws', '>= 3.14.0'

# Use CCS Frontend Helpers
gem 'ccs-frontend_helpers', '~> 0.4.0'
gem 'ccs-frontend_helpers', '~> 1.0.0'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down
23 changes: 8 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ GEM
caxlsx_rails (0.6.3)
actionpack (>= 3.1)
caxlsx (>= 3.0)
ccs-frontend_helpers (0.4.0)
ccs-frontend_helpers (1.0.0)
rails (>= 6.0)
clamby (1.6.8)
cliver (0.3.2)
Expand Down Expand Up @@ -371,10 +371,6 @@ GEM
nokogiri (1.16.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
notifications-ruby-client (6.1.0)
jwt (>= 1.5, < 3)
oauth2 (2.0.9)
Expand All @@ -401,6 +397,11 @@ GEM
capybara (>= 2.1, < 4)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
propshaft (0.9.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
rack
railties (>= 7.0.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -594,13 +595,6 @@ GEM
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
stringio (3.1.0)
strscan (3.1.0)
sys-uname (1.2.3)
Expand Down Expand Up @@ -673,7 +667,7 @@ DEPENDENCIES
caracal-rails (>= 1.0.2)
caxlsx (>= 3.2.0)
caxlsx_rails (>= 0.6.3)
ccs-frontend_helpers (~> 0.4.0)
ccs-frontend_helpers (~> 1.0.0)
cssbundling-rails (~> 1.4)
cucumber-rails (>= 2.6.1)
database_cleaner (>= 2.0.1)
Expand All @@ -696,6 +690,7 @@ DEPENDENCIES
omniauth-oauth2 (~> 1.8.0)
pg (>= 0.18, < 2.0)
poltergeist (>= 1.18.1)
propshaft
pry-byebug
pry-rails
pry-rescue
Expand Down Expand Up @@ -724,8 +719,6 @@ DEPENDENCIES
site_prism (>= 3.7.3)
slim (~> 5.2.1)
smarter_csv
sprockets (>= 3.7.2)
sprockets-rails
turbolinks (~> 5)
tzinfo-data
uk_postcode
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ If you do not want to run Sidekiq, pass the `--no-sidekiq` to the `bin/dev` comm
### Design & frontend

The design of the app is closely based on the [GOV.UK Design System][] with some minor CCS-related variations.
The project uses and extends the [GOV.UK Frontend][] npm package.
The project uses and extends the [CCS Frontend][] and [GOV.UK Frontend][] npm packages.

The npm package dependencies are listed in `package.json`, installed using [yarn][], and the exact versions of all dependencies direct/indirect are locked in `yarn.lock`.

Expand Down Expand Up @@ -359,6 +359,7 @@ environments:
[feature-specs]: https:/Crown-Commercial-Service/crown-marketplace/tree/master/spec/features
[factory_bot_rails]: https:/thoughtbot/factory_bot_rails
[GOV.UK Frontend]: https:/alphagov/govuk-frontend
[CCS Frontend]: https:/tim-s-ccs/ccs-frontend-project
[yarn]: https:/yarnpkg/yarn
[GOV.UK Design System]: https://design-system.service.gov.uk/
[Block Element Modifier]: http://getbem.com/
Expand Down
2 changes: 0 additions & 2 deletions app/assets/config/manifest.js

This file was deleted.

Binary file removed app/assets/images/ccs-icon-180.png
Binary file not shown.
Binary file removed app/assets/images/ccs-icon-192.png
Binary file not shown.
Binary file removed app/assets/images/ccs-icon-512.png
Binary file not shown.
Binary file removed app/assets/images/ccs-opengraph-image.png
Binary file not shown.
Binary file removed app/assets/images/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion app/assets/images/favicon.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/mask-icon.svg

This file was deleted.

4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Import our settings for CCS and GOV.UK
@import "settings/all";

// Import the govuk-frontend assets
@import "govuk-frontend/dist/govuk/all";
// Import the ccs-frontend and govuk-frontend assets
@import "ccs-frontend/dist/ccs/all";

// Import the additional CCS components
@import "components/all";
Expand Down
2 changes: 0 additions & 2 deletions app/assets/stylesheets/components/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
@import "basket/basket";
@import "checkbox-accordion/checkbox-accordion";
@import "dashboard-section/dashboard-section";
@import "header/header";
@import "footer/footer";
@import "info-panel/info-panel";
@import "logo/logo";
@import "notification-banner/notification-banner";
@import "panel/panel";
@import "password-rules/password-rules";
Expand Down
Loading

0 comments on commit 96dc7f7

Please sign in to comment.