Skip to content

Commit

Permalink
chore: Adjust docs for vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Dec 7, 2024
1 parent c5966a3 commit 7c3357a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Dependabot](https://img.shields.io/badge/dependabot-enabled-success)](https://github.com/technowledgy/vue-postgrest/blob/main/package.json)
[![License](https://img.shields.io/npm/l/vue-postgrest)](https://github.com/technowledgy/vue-postgrest/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/vue-postgrest)](https://www.npmjs.com/package/vue-postgrest)
![vue](https://img.shields.io/badge/vue-2.x-brightgreen)
![vue](https://img.shields.io/badge/vue-3.x-brightgreen)

</div>

Expand All @@ -28,10 +28,10 @@ yarn add vue-postgrest
Import and install the Plugin in your `main.js`:

``` javascript
import Vue from 'vue'
import { createApp } from 'vue'
import Postgrest from 'vue-postgrest'

Vue.use(Postgrest)
createApp(...).use(Postgrest)
```

You can use the `<postgrest>` component:
Expand Down
10 changes: 5 additions & 5 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ The `vue-postgrest` module exports a plugin, a mixin and several helper function
- **Example:**

``` js
import Vue from 'vue'
import { createApp } from 'vue'
import VuePostgrest from 'vue-postgrest'

Vue.use(VuePostgrest)
createApp(...).use(VuePostgrest)
```

### pg - Mixin
Expand Down Expand Up @@ -143,7 +143,7 @@ Instances of PrimaryKeyError are thrown, when no primary keys are found for the

## Plugin Options

Global options can be set when initializing Vue-Postgrest with `Vue.use`.
Global options can be set when initializing VuePostgrest with `app.use`.

### apiRoot

Expand All @@ -164,7 +164,7 @@ Global options can be set when initializing Vue-Postgrest with `Vue.use`.
``` js
import VuePostgrest from 'vue-postgrest'

Vue.use(VuePostgrest, {
app.use(VuePostgrest, {
apiRoot: '/api/'
})
```
Expand All @@ -184,7 +184,7 @@ Global options can be set when initializing Vue-Postgrest with `Vue.use`.
``` js
import VuePostgrest from 'vue-postgrest'

Vue.use(VuePostgrest, {
app.use(VuePostgrest, {
apiRoot: '/api/',
headers: {
Prefer: 'timezone=' + Intl.DateTimeFormat().resolvedOptions().timeZone
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ npm install vue-postgrest
The default export provides the plugin to use in your `main.js`. When installing the plugin, you can pass the root URI of your PostgREST server as a plugin option. All requests to the API made by the mixin, component or instance methods will use this URI as base.

``` js
import Vue from 'vue'
import { createApp } from 'vue'
import VuePostgrest from 'vue-postgrest'

Vue.use(VuePostgrest, {
createApp(...).use(VuePostgrest, {
apiRoot: '/api/v1/'
})
```
Expand Down
4 changes: 2 additions & 2 deletions docs/start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ yarn add vue-postgrest
Import and install the Plugin in your `main.js`:

``` javascript
import Vue from 'vue'
import { createApp } from 'vue'
import Postgrest from 'vue-postgrest'

Vue.use(Postgrest)
createApp(...).use(Postgrest)
```

You can use the `<postgrest>` component:
Expand Down

0 comments on commit 7c3357a

Please sign in to comment.