Skip to content

Commit 0312948

Browse files
committed
update installation instructions for simple scope
1 parent 71994d8 commit 0312948

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

www/src/content/docs/scope.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ Output:
2929

3030
## Installation
3131

32-
### With the Simple Query Astro integration
33-
34-
Simple Scope is included with the [Simple Query](/query#installation) Astro integration. You can apply this integration using the `astro add` CLI:
35-
36-
```bash
37-
astro add simple-stack-query
38-
```
39-
40-
If you do not want to use Simple Query, install as a vite plugin with the following instructions.
41-
42-
### As a vite plugin
43-
4432
Simple scope is a vite plugin compatible with any vite-based framework (Astro, Nuxt, SvelteKit, etc). First install the dependency from npm:
4533

4634
```bash
@@ -59,6 +47,12 @@ import simpleScope from 'vite-plugin-simple-scope';
5947
- [Nuxt vite plugin configuration](https://nuxt.com/docs/getting-started/configuration#external-configuration-files)
6048
- [SvelteKit vite plugin configuration](https://kit.svelte.dev/docs/project-structure#project-files-vite-config-js)
6149

50+
Finally, import the ambient types for the `simple:scope` module. You can update [your `vite-env.d.ts` file](https://vite.dev/guide/env-and-mode.html#intellisense-for-typescript) in plain Vite projects, or your project-specific ambient types file in frameworks like Astro.
51+
52+
```ts ins={1}
53+
/// <reference types="vite-plugin-simple-scope/types" />
54+
```
55+
6256
## Usage
6357

6458
You can import the `scope()` utility from `simple:scope` in any JavaScript-based file. This function accepts an optional prefix string for naming different scoped identifiers.

0 commit comments

Comments
 (0)