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
Web components: TypeScript conversion and build improvements (#223)
* ensure all src files are typescript
* export type definitions
* update vite config to resolve vite associated errors
* use default text alignment for language in banner
* remove vite error info from readme
* regenerate lockfile
* Update TypeScript conversion and build improvements
Resolved vite error and provided types export in package.
Signed-off-by: Ethan Gardner <ethangardner@users.noreply.github.com>
* ignore ephemeral files in changesets
* remove window call to provide better support for ssg frameworks
---------
Signed-off-by: Ethan Gardner <ethangardner@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,6 @@ This can be seen in the demo on the [USWDS Elements Storybook](<https://federali
80
80
81
81
**Note:** Please be mindful of the accessibility implications of customizing component appearance. It is your responsibility to ensure that your customizations meet the [accessibility requirements](https://designsystem.digital.gov/accessibility/) of the design system and pass any [WCAG 2.2](https://www.w3.org/TR/WCAG22/) or [Section 508](https://www.section508.gov/) accessibility tests.
82
82
83
-
> [!IMPORTANT]
84
-
> If you are bundling your application using Vite, you may encounter a JavaScript error when using the `usa-banner` component with Vite's dev server (this also applies to other Vite-based tools such as Astro). To work around this, you may need to run the dev server in production mode by prefixing the command to start the server with `NODE_ENV=production`. For instance, if you run the command `npm run dev` to start your dev server, you should start it with `NODE_ENV=production npm run dev`.
85
-
86
83
## Documentation
87
84
88
85
For more detailed documentation, refer to the Storybook for USWDS Elements. You can visit the most up-to-date Storybook documentation on [Cloud.gov Pages](https://federalist-ab6c0bdb-eccd-4b26-bb5f-b0154661e999.sites.pages.cloud.gov/site/uswds/web-components/?path=/docs/readme--docs).
@@ -138,10 +135,13 @@ npx @changesets/cli pre exit
138
135
139
136
2. Bump versions locally (optional)
140
137
- To update package.json versions and changelogs locally before publishing:
138
+
141
139
```bash
142
140
npx @changesets/cli version
143
141
```
142
+
144
143
- Commit the resulting changes (package.json updates and generated changelog files):
144
+
145
145
```bash
146
146
git add .
147
147
git commit -m "chore(release): version packages and changelogs"
@@ -151,9 +151,11 @@ npx @changesets/cli pre exit
151
151
- Option A — Let the repository automation handle publishing (recommended):
152
152
- Push your branch to GitHub and open a PR. The CI / release automation will run and, depending on the configuration and merged changesets, will publish releases when merged to `main`.
153
153
- Option B — Publish locally (requires NPM credentials and appropriate tokens):
154
+
154
155
```bash
155
156
npm run release
156
157
```
158
+
157
159
This script typically runs your tokenized publish flow (it may run builds and then `changeset publish`).
158
160
159
161
#### How the automation works (GitHub Actions)
@@ -163,7 +165,6 @@ npx @changesets/cli pre exit
163
165
- The action can either create a release PR or publish directly to NPM depending on repository and action settings.
164
166
- The workflow uses repository secrets:
165
167
- `GITHUB_TOKEN` — standard workflow permission for the action to create PRs/commits.
166
-
- `NPM_TOKEN` — required to publish packages to the NPM registry.
167
168
- The action is configured to run the project’s release script (for example `npm run release`) and is run in a controlled environment; it will also disable Husky hooks during automated runs (HUSKY=0) to avoid local commit hooks blocking automation.
0 commit comments