Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhectorsosa committed Feb 14, 2024
1 parent faa1e3c commit f24ab8d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/getting-started/from-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ pnpm dev
:::

::: tip :tada: Congratulations!
You are done! See [Installation](/modules/installation) to install individual Modules. Remember to run `pnpm db:stop` to save resources once you are done working with your local Supabase Instance.
You are done! See [Installation](/modules/installation) for more information about the Modules. Remember that all modules are installed by default in this example.

Remember to run `pnpm db:stop` to save resources once you are done working with your local Supabase Instance.
:::
12 changes: 12 additions & 0 deletions docs/modules/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Installation

### Hooks

Make sure you work in a `/modules` directory from the root repository.

::: code-group
Expand All @@ -14,3 +16,13 @@ degit iamhectorsosa/supabase-modules/playground/modules/auth auth
<<< ../../playground/modules/auth/index.ts [Manual]

:::

## Usage

### `useSignInWithEmailPassword`

<<< ../../playground/app/login/LoginForm.tsx#auth-snippet{4-18}

::: info
VIP
:::
4 changes: 4 additions & 0 deletions docs/modules/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Installation

::: warning Before proceeding
If you are starting from an example project, all types, utilities are modules are installed by default. You can continue reviewing individual modules for more information about usage.
:::

## Database TypeScript types

If you are starting from an example project, your database's TypeScript types are already included. However, if at any point you update your database, you might have to re-generate your database's TypeScript types as well.
Expand Down
30 changes: 28 additions & 2 deletions docs/modules/profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Installation

Make sure you work in a `/modules` directory from the root repository.
### Hooks

Make sure you work in a `/modules/profile` directory from the root repository.

::: code-group

Expand All @@ -11,6 +13,30 @@ cd modules
degit iamhectorsosa/supabase-modules/playground/modules/profile profile
```

<<< ../../playground/modules/profile/index.ts [Manual]
<<< ../../playground/modules/profile/index.ts [index.ts]

:::

### Migration

Make sure you work in a `/supabase/migrations` directory from the root repository.

::: code-group

```bash [Using degit]
cd modules
degit iamhectorsosa/supabase-modules/playground/supabase/migrations

# degit will copy all migrations, delete the ones you do not need
# you only need `20240214100236_profile.sql` for this module
```

<<< ../../playground/supabase/migrations/20240214100236_profile.sql [20240214100236_profile.sql]

:::

## Usage

::: info
VIP
:::

0 comments on commit f24ab8d

Please sign in to comment.