Skip to content

Commit e10e348

Browse files
authored
Merge pull request #1568 from uswds/al-migration-edits
USWDS 3.0 - Migration page copy edits
2 parents 5df04a9 + 5bf9016 commit e10e348

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

pages/documentation/migration-V3.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ Most of the source code now lives in `/@uswds/uswds/packages` but some compiled
6767
An individual package looks like this:
6868

6969
```
70-
├── packages/
7170
│ ...
7271
│ ├── usa-accordion/
7372
│ │ ├── src/
7473
│ │ │ ├── content/
74+
│ │ │ │ ├── index.js
75+
│ │ │ │ ├── usa-accordion.json
76+
│ │ │ │ ├── usa-accordion~bordered.json
77+
│ │ │ │ ├── usa-accordion~multiselectable.json
7578
│ │ │ ├── styles/
7679
│ │ │ │ ├── _index.scss
7780
│ │ │ │ └── accordion.scss
@@ -81,7 +84,7 @@ An individual package looks like this:
8184
│ │ │ ├── index.js
8285
│ │ │ ├── usa-accordion.stories.js
8386
│ │ │ └── usa-accordion.twig
84-
│ │ └── _index.scss_/
87+
│ │ └── _index.scss
8588
```
8689

8790
Most teams won't ever need to know what's happening inside the USWDS source code, but the more you know about what's going on under the hood, the better you can understand what's happening and why as you migrate to USWDS 3.0.
@@ -105,7 +108,7 @@ There are four necessary steps migrating to USWDS 3.0. In addition to the requir
105108
### 1. Check your current USWDS code and settings versions
106109

107110
{:.border-top-2px.border-base-lighter.padding-top-1}
108-
USWDS 3.0 uses the same styles and markup as USWDS 2.13.3 — and, with one exception, the same settings. This means that if you're currently using USWDS 2.13.3, there's no styles and markup to update. But if you're using a version older than 2.13.3, migrating to USWDS 3.0 may mean updating some of your markup and settings.
111+
USWDS 3.0 uses the same styles and markup as USWDS 2.13.3 — and, with one exception, the same settings. This means that if you're currently using USWDS 2.13.3, there are no styles or markup to update. But if you're using a version older than 2.13.3, migrating to USWDS 3.0 may mean updating some of your markup and settings.
109112

110113
So, before migrating, check the versions of both your existing USWDS code and its settings (since code and settings may be different).
111114

@@ -182,7 +185,7 @@ Add this load path to your compiler settings, or update any old paths if your co
182185
- const pkg = require("./node_modules/uswds/package.json");
183186
+ const pkg = require("./node_modules/@uswds/uswds/package.json");
184187
...
185-
- const uswds = require("./node_modules/uswds/package.json");
188+
- const uswds = require("./node_modules/uswds-gulp/config/uswds");
186189
+ const uswds = "node_modules/@uswds/uswds";
187190
or
188191
- const USWDS = "node_modules/uswds/dist";
@@ -599,7 +602,7 @@ These instructions will help you update your `@import` references to the new syn
599602

600603
#### Update your @import references
601604

602-
1. **Replace all instances of @import with @forward in your Sass entry point.** Update all of the `@import` references in your Sass entry point to `@forward`.
605+
1. **Replace all instances of @import with @forward in your Sass entry point.**
603606

604607
```diff
605608
- @import "uswds-theme-color";
@@ -951,7 +954,6 @@ Instead of simply forwarding the `usa-banner` component, you can import the comp
951954
952955
// Import the component and all related dependencies
953956
@forward "usa-banner";
954-
@forward "usa-icon";
955957
@forward "usa-layout-grid";
956958
@forward "usa-media-block";
957959
@forward "uswds-fonts";
@@ -961,7 +963,6 @@ Now, instead of pointing at the component packages, we can point directly at the
961963
962964
```scss
963965
@forward "usa-banner/src/styles";
964-
@forward "usa-icon/src/styles";
965966
@forward "usa-layout-grid/src/styles";
966967
@forward "usa-media-block/src/styles";
967968
@forward "uswds-fonts";

0 commit comments

Comments
 (0)