Skip to content

Commit

Permalink
docs: add logo and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcate committed Mar 15, 2024
1 parent 1656eb3 commit 6b0e86b
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 38 deletions.
88 changes: 50 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,74 @@
<!--
Get your module up and running quickly.
![vue-uswds logo](https://raw.githubusercontent.com/patrickcate/nuxt-uswds/main/playground/public/logo.svg)

Find and replace all on all files (CMD+SHIFT+F):
- Name: My Module
- Package name: my-module
- Description: My new Nuxt module
-->

# My Module
# Nuxt USWDS

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

My new Nuxt module for doing amazing things.
Easy U.S. Web Design System (USWDS) integration for Nuxt.js.

[&nbsp;Release Notes](/CHANGELOG.md)

- [&nbsp;Release Notes](/CHANGELOG.md)
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
<!-- - [📖 &nbsp;Documentation](https://example.com) -->
## Introduction

Nuxt USWDS integrates the [Vue USWDS](https://github.com/patrickcate/vue-uswds) library into Nuxt.js.

## Features

<!-- Highlight some of the features your module provide here -->
-&nbsp;Foo
- 🚠 &nbsp;Bar
- 🌲 &nbsp;Baz
- [Auto import](https://nuxt.com/docs/guide/concepts/auto-imports) all Vue USWDS components.
- Automatically uses `NuxtLink` for Vue USWDS component linking.
- Supports all [Vue USWDS](https://patrickcate.github.io/vue-uswds/?path=/story/guide-configuration--page) options.

## Quick Setup

1. Add `my-module` dependency to your project
1. Add `nuxt-uswds` dependency to your project. You will also need to install `vue-uswds` as it is a peer dependency.

```bash
# Using npm
npm install nuxt-uswds vue-uswds

# Using pnpm
pnpm add -D my-module
pnpm add nuxt-uswds vue-uswds

# Using yarn
yarn add --dev my-module

# Using npm
npm install --save-dev my-module
yarn add nuxt-uswds vue-uswds
```

2. Add `my-module` to the `modules` section of `nuxt.config.ts`
2. Add `nuxt-uswds` to the `modules` section of `nuxt.config.ts`

```js
export default defineNuxtConfig({
modules: ['nuxt-uswds'],
});
```

That's it! You can now use all Vue USWDS components in your Nuxt app ✨

## Options

The module supports the following options. They can be added to your `nuxt.config.ts` module configuration:

```js
{
modules: [
'my-module'
[
'nuxt-uswds'',
{
// Modules options...
},
],
]
})
}
```
That's it! You can now use My Module in your Nuxt app ✨
| Name | Type | Default | Description |
| -------------------------- | --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `autoImportBaseComponents` | `boolean` | `true` | Enabled Nuxt's auto-import of all Vue USWDS base components. You should only need to turn disable this option if you have a name conflict with Vue USWDS's `BaseLink` or `BaseHeading` internal components. |
| `autoImportComponents` | `boolean` | `true` | Enabled Nuxt's auto-import of all regular Vue USWDS components. |
| `baseComponentPrefix` | `string` | `''` | If you have a name conflict with Nuxt.js's auto importing of Vue USWDS's `BaseLink` or `BaseHeading` internal components, you can set an additional prefix with this option. |
| `componentPrefix` | `string` | `''` | All [Vue USWDS components](https://patrickcate.github.io/vue-uswds/) are prefixed with `Usa`. This should prevent any name conflicts with Nuxt.js's auto importing of components. If you encounter an issues however, you can add an additional prefix with this option. |
| `vueUswds` | `object` | `{}` | Any [Vue USWDS](https://patrickcate.github.io/vue-uswds/?path=/story/guide-configuration--page) options to want to use. The `routerComponentName` option is automatically set to 'NuxtLink' |

## Development

Expand Down Expand Up @@ -81,14 +97,10 @@ npm run release
```

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/my-module

[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/my-module

[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/my-module

[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com
[npm-version-src]: https://img.shields.io/npm/v/nuxt-uswds/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/nuxt-uswds
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-uswds.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/nuxt-uswds
[license-src]: https://img.shields.io/npm/l/nuxt-uswds.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/nuxt-uswds
1 change: 1 addition & 0 deletions playground/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6b0e86b

Please sign in to comment.