You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/documentation/migration-V3.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,11 +67,14 @@ Most of the source code now lives in `/@uswds/uswds/packages` but some compiled
67
67
An individual package looks like this:
68
68
69
69
```
70
-
├── packages/
71
70
│ ...
72
71
│ ├── usa-accordion/
73
72
│ │ ├── src/
74
73
│ │ │ ├── content/
74
+
│ │ │ │ ├── index.js
75
+
│ │ │ │ ├── usa-accordion.json
76
+
│ │ │ │ ├── usa-accordion~bordered.json
77
+
│ │ │ │ ├── usa-accordion~multiselectable.json
75
78
│ │ │ ├── styles/
76
79
│ │ │ │ ├── _index.scss
77
80
│ │ │ │ └── accordion.scss
@@ -81,7 +84,7 @@ An individual package looks like this:
81
84
│ │ │ ├── index.js
82
85
│ │ │ ├── usa-accordion.stories.js
83
86
│ │ │ └── usa-accordion.twig
84
-
│ │ └── _index.scss_/
87
+
│ │ └── _index.scss
85
88
```
86
89
87
90
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
105
108
### 1. Check your current USWDS code and settings versions
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.
109
112
110
113
So, before migrating, check the versions of both your existing USWDS code and its settings (since code and settings may be different).
111
114
@@ -182,7 +185,7 @@ Add this load path to your compiler settings, or update any old paths if your co
@@ -599,7 +602,7 @@ These instructions will help you update your `@import` references to the new syn
599
602
600
603
#### Update your @import references
601
604
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.**
603
606
604
607
```diff
605
608
- @import "uswds-theme-color";
@@ -951,7 +954,6 @@ Instead of simply forwarding the `usa-banner` component, you can import the comp
951
954
952
955
// Import the component and all related dependencies
953
956
@forward "usa-banner";
954
-
@forward "usa-icon";
955
957
@forward "usa-layout-grid";
956
958
@forward "usa-media-block";
957
959
@forward "uswds-fonts";
@@ -961,7 +963,6 @@ Now, instead of pointing at the component packages, we can point directly at the
0 commit comments