# Setup

## Install

:warning: Requires Nuxt version >= 2.13 :warning:

Install with yarn:

```shell script
yarn add @byu-oit/nuxt-sis-context
```

Install with npm:

```shell script
npm install @byu-oit/nuxt-sis-context
```

**nuxt.config.js**

```js
module.exports = {
    modules: [
        '@byu-oit/nuxt-sis-context',
    ],
}
```

## Typescript

Add the types to your "types" array in tsconfig.json after the @nuxt/types (Nuxt 2.12.0+)

**tsconfig.json**
```json
{
  "compilerOptions": {
    "types": [
      "@nuxt/types",
      "@byu-oit/nuxt-sis-context"
    ]
  }
}
```

> **Why?**
>
> Because of the way nuxt works the `$axios` property on the context has to be merged into the nuxt `Context` interface via [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html). Adding `@byu-oit/nuxt-sis-context` to your types will import the types from the package and make typescript aware of the additions to the `Context` interface.

# Usage

TODO
