Skip to content

Commit a85ca52

Browse files
committed
docs: 📝 update readme for local dev
1 parent 0eca746 commit a85ca52

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,28 @@ Create an
5050

5151
## Developing locally
5252

53-
If you have cloned this locally and are wondering why there's a linter
54-
warning for `sveltekit-embed` that's because you'll need to package
55-
and install the project locally.
53+
Import the component locally into the `index.md` file:
54+
55+
```svelte
56+
import MyComponent from '$lib/components/my-component.svelte'
57+
```
58+
59+
Test the package locally with the `package:local` script:
5660

5761
```bash
58-
# package with sveltkit
59-
npm run package
60-
# install local package
61-
npm i -D ./package
62+
npm run package:local
63+
```
64+
65+
And add it to the import statement in the `index.md` file:
66+
67+
```svelte
68+
import { MyComponent } from 'sveltekit-embed'
6269
```
6370

64-
You can use the components locally via the `src/routes/index.svelte`
65-
file.
71+
Test locally, then submit a PR 🙏
6672

67-
If you're adding a new component to `src/lib/components` then add the
68-
export to `src/lib/index.ts`.
73+
If you're adding a new component to be used in the package then add an
74+
export to the `src/lib/index.ts` file.
6975

7076
## Thanks
7177

0 commit comments

Comments
 (0)