-
Notifications
You must be signed in to change notification settings - Fork 13
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
3640 - update asset paths to reference css-library and uswds packages, add missing files to css-library #1519
Conversation
…, add missing files to css-library
packages/css-library/package.json
Outdated
"clean-dist": "rimraf dist/*", | ||
"copy:scss-files": "cp -rv src/stylesheets/_override-function.scss dist/stylesheets/_override-function.scss && cp -rv src/stylesheets/_mixins.scss dist/stylesheets/_mixins.scss && cp -rv src/stylesheets/_functions.scss dist/stylesheets/_functions.scss && cp -rv src/stylesheets/formation-overrides/_variables.scss dist/stylesheets/formation-overrides/_variables.scss", | ||
"copy-assets": "cp -rv src/assets/fonts dist/fonts/ && cp -rv src/assets/img dist/img/", | ||
"copy": "node ./copy-uswds-color-tokens.js && yarn run copy-assets" | ||
"copy": "node ./copy-uswds-color-tokens.js && yarn run copy-assets", | ||
"clean-css-urls": "sed -i '' -e 's|\"/img/info.png\"|~@department-of-veterans-affairs/css-library/dist/img/info.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/info.svg\"|~@department-of-veterans-affairs/css-library/dist/img/info.svg|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/success.png\"|~@department-of-veterans-affairs/css-library/dist/img/success.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/success.svg\"|~@department-of-veterans-affairs/css-library/dist/img/success.svg|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/warning.png\"|~@department-of-veterans-affairs/css-library/dist/img/warning.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/warning.svg\"|~@department-of-veterans-affairs/css-library/dist/img/warning.svg|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/error.png\"|~@department-of-veterans-affairs/css-library/dist/img/error.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/error.svg\"|~@department-of-veterans-affairs/css-library/dist/img/error.svg|g' ./dist/stylesheets/{,**/}*.css" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very ugly, but the v1 version of alert styles is being generated from the old uswds package so there is nowhere in our code that we can update these references until after build. We need to find out if these alert styles can get removed so that we don't need to do this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd have to check to verify, but I'm fairly certain v1 alert styles aren't being used anywhere at this point 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need all of these new images?
packages/css-library/package.json
Outdated
"clean-dist": "rimraf dist/*", | ||
"copy:scss-files": "cp -rv src/stylesheets/_override-function.scss dist/stylesheets/_override-function.scss && cp -rv src/stylesheets/_mixins.scss dist/stylesheets/_mixins.scss && cp -rv src/stylesheets/_functions.scss dist/stylesheets/_functions.scss && cp -rv src/stylesheets/formation-overrides/_variables.scss dist/stylesheets/formation-overrides/_variables.scss", | ||
"copy-assets": "cp -rv src/assets/fonts dist/fonts/ && cp -rv src/assets/img dist/img/", | ||
"copy": "node ./copy-uswds-color-tokens.js && yarn run copy-assets" | ||
"copy": "node ./copy-uswds-color-tokens.js && yarn run copy-assets", | ||
"clean-css-urls": "sed -i '' -e 's|\"/img/info.png\"|~@department-of-veterans-affairs/css-library/dist/img/info.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/info.svg\"|~@department-of-veterans-affairs/css-library/dist/img/info.svg|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/success.png\"|~@department-of-veterans-affairs/css-library/dist/img/success.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/success.svg\"|~@department-of-veterans-affairs/css-library/dist/img/success.svg|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/warning.png\"|~@department-of-veterans-affairs/css-library/dist/img/warning.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/warning.svg\"|~@department-of-veterans-affairs/css-library/dist/img/warning.svg|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/error.png\"|~@department-of-veterans-affairs/css-library/dist/img/error.png|g' ./dist/stylesheets/{,**/}*.css && sed -i '' -e 's|\"/img/error.svg\"|~@department-of-veterans-affairs/css-library/dist/img/error.svg|g' ./dist/stylesheets/{,**/}*.css" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd have to check to verify, but I'm fairly certain v1 alert styles aren't being used anywhere at this point 🤔
@@ -386,7 +386,7 @@ article > h1 { | |||
padding: scale-rule(1rem 0); | |||
} | |||
|
|||
background: url('#{$image-path}/stars.png') no-repeat center; | |||
background: url(~@department-of-veterans-affairs/css-library/dist/img/stars.png) no-repeat center; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah nice, cool to see that this works. I wasn't sure if we would need to rewrite relative paths or not. Hopefully we can just get away with referencing the node nodules path this way 🤞
I found a few icons that were not being used, and also found a solution to the generated url issue. |
Chromatic
https://3640-css-library-assets--65a6e2ed2314f7b8f98609d8.chromatic.com
Description
Closes 3640
QA Checklist
Screenshots
No discernable change -
va.gov original:

va.gov updated:

Acceptance criteria
Definition of done