-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
@@ -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: |
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 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; |
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.
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. |
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.
Combined my previous note with the old copyAssets
note to avoid duplicate guidance. As well as point users to the actual update task.
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 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.
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
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.
Looks good to me!
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.
Lgtm!
Thanks for the reviews. I've also scanned the website and didn't find any references to the old task: exports.update = uswds.updateUswds; |
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.
Looks good! Thanks!
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:
Major changes
update
task in sample gulpfile example for clarity.copyAssets
tip to preferupdateUswds
and the copy task as an additional note.Closes #90.