Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Ruby code for Asset Helper Plugin #1229

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ GEM
tzinfo-data (1.2023.3)
tzinfo (>= 1.0.0)
unicode-display_width (1.8.0)
wdm (0.1.1)
webrick (1.8.2)
yell (2.2.2)

Expand All @@ -114,6 +115,7 @@ DEPENDENCIES
jekyll-seo-tag
jekyll-sitemap
tzinfo-data
wdm (~> 0.1.0)
webrick

BUNDLED WITH
Expand Down
7 changes: 7 additions & 0 deletions _plugins/asset-helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ def self.process(site, payload)
FileUtils.cp_r('node_modules/@uswds/uswds/dist/js/', 'assets/', verbose: true)
FileUtils.cp_r('node_modules/@uswds/uswds/dist/img/', 'assets/', verbose: true)
FileUtils.cp_r('node_modules/@uswds/uswds/dist/fonts/', 'assets/', verbose: true)
# The below Ruby code copies individual files from the node package to the assets folder /assets/css/.
# The FileUtils.copy method copies individual uswds files to the site's existing /assets/css/ folder.
# This prevents overwriting the /assets/css/ folder that contains other files needed by the site
# to run and display properly. Do not change the function below to use the FileUtils.cp_r function(unless you know what you are doing).
FileUtils.copy('node_modules/@uswds/uswds/dist/css/uswds.css', 'assets/css/', verbose: true)
FileUtils.copy('node_modules/@uswds/uswds/dist/css/uswds.min.css', 'assets/css/', verbose: true)
FileUtils.copy('node_modules/@uswds/uswds/dist/css/uswds.min.css.map', 'assets/css/', verbose: true)
@processed = true
end
end
Expand Down
11 changes: 1 addition & 10 deletions assets/img/checkbox-indeterminate-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 1 addition & 10 deletions assets/img/checkbox-indeterminate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
429 changes: 152 additions & 277 deletions assets/js/uswds.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions assets/js/uswds.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/uswds.min.js.map

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading