Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalom committed Mar 23, 2020
1 parent c3e6499 commit 6faeae0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Make sure `tailwindcss-module: ^1.4.0` (or higher) is installed.

## Setup

### Nuxt

1. Add `nuxt-breaky` as a dev-dependency to your project

```bash
Expand Down Expand Up @@ -73,13 +75,44 @@ NOTE: Use the `modules` section if you are using Nuxt older than `v2.9`. [More I

NOTE: Please be aware this adds ~19.5KB (~3.5KB) to the client bundle size when you are in development mode. [More Info](https://github.com/nuxt-community/tailwindcss-module#referencing-in-javascript)

### Vue

1. Add `nuxt-breaky` as a dev-dependency to your project

```bash
yarn add nuxt-breaky --dev

# or npm install nuxt-breaky --save-dev
```

2. Add the following code to your `main.js`

```js
import resolveConfig from 'tailwindcss/resolveConfig' // used to merge tailwindcss default config with your custom config
import Breaky from 'nuxt-breaky/lib/plugin-vue'

Vue.use(Breaky, {
tailwindConfig: resolveConfig(require('./tailwind.config')), // Required

// Additional options
enabled: true,
enableInProd: process.env.DEPLOY_ENV === 'GH_PAGES',
position: 'bottomRight',
colorScheme: 'auto',
})
```

NOTE: Please be aware this adds ~19.5KB (~3.5KB) to the bundle size when you are in development mode.

## Usage

The breaky module automatically adds the breaky plugin when in `development` mode.
No need to register or include it anywhere else.

### Configuration

#### Nuxt

You can pass options to the breaky using both the module options and the Nuxt config way.

```js
Expand All @@ -94,6 +127,14 @@ You can pass options to the breaky using both the module options and the Nuxt co
}
```

#### Vue

```js
Vue.use(Breaky, {
/* plugin options */
})
```

#### Available Options

| Option | Type | Default | Options | Description |
Expand Down

0 comments on commit 6faeae0

Please sign in to comment.