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

USWDS-Compile - README: Add staying up-to-date note. #92

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

mejiaj
Copy link
Contributor

@mejiaj mejiaj commented Mar 22, 2024

Adds basic information for staying up to date with USWDS.

Changed our example gulpfile.js to be more specific on update task:

README.md

Sample gulpfile example:

- exports.update = uswds.updateUswds;
+ exports.updateUswds = uswds.updateUswds;

Major changes

  • Renamed update task in sample gulpfile example for clarity.
  • Updated copyAssets tip to prefer updateUswds and the copy task as an additional note.

Closes #90.

@mejiaj mejiaj requested review from mahoneycm and amyleadem March 22, 2024 15:00
@@ -28,7 +28,7 @@ npm install @uswds/compile --save-dev

### Gulpfile setup

Create a file called `gulpfile.js` at the root of your project (or use an existing Gulpfile if one already exists). It needs to do the following
Create a file called `gulpfile.js` at the root of your project (or use an existing Gulpfile if one already exists). It needs to do the following:
Copy link
Contributor Author

@mejiaj mejiaj Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added for consistency with other lists.

@@ -129,7 +129,7 @@ For example, if you have the following `gulpfile.js`:
exports.compile = uswds.compile;
exports.watch = uswds.watch;
exports.init = uswds.init;
exports.update = uswds.updateUswds;
exports.updateUswds = uswds.updateUswds;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to improve clarity and reduce confusion when testing.

README.md Outdated

### Usage tips

- **Use `init` only once.** The `init` task is meant for initializing the design system on a project. Since it will overwrite project files (like settings files and the Sass entry point), use it sparingly and don't use it for updating the design system on a project, or at any point after you've customized your settings files.
- **Update USWDS assets with `copyAssets`.** Don't update assets with `init`, use the `copyAssets` task. This task updates static assets (like images, fonts, and compiled JavaScript) only and you don't risk clobbering your customizations.
- **Staying up-to-date with USWDS.** When updating your project's version of USWDS; code won't be copied over until you run the `npx gulp updateUswds` command. You can see all of the required changes available on the [USWDS releases](https://github.com/uswds/uswds/releases) page. Alternatively, you can run the `copyAssets` task. This task updates static assets (like images, fonts, and compiled JavaScript) only and you don't risk clobbering your customizations.
Copy link
Contributor Author

@mejiaj mejiaj Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined my previous note with the old copyAssets note to avoid duplicate guidance. As well as point users to the actual update task.

Copy link
Contributor

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this addition. Thanks for adding it!
It looks good, but I added a few suggestions below for improved clarity. Let me know if you have questions.

README.md Outdated Show resolved Hide resolved
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
@mejiaj mejiaj requested a review from amyleadem March 22, 2024 15:59
Copy link
Contributor

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

@mahoneycm mahoneycm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@mejiaj mejiaj requested a review from annepetersen March 28, 2024 13:53
@mejiaj
Copy link
Contributor Author

mejiaj commented Mar 28, 2024

Thanks for the reviews. I've also scanned the website and didn't find any references to the old task:

exports.update = uswds.updateUswds;

Copy link
Member

@thisisdano thisisdano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@thisisdano thisisdano merged commit b2136ac into develop Apr 26, 2024
1 check passed
@thisisdano thisisdano deleted the jm-uswds-update-instructions branch April 26, 2024 20:55
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.

USWDS-Compile - Feature: Add staying up-to-date with USWDS in usage tips
4 participants