Skip to content

Commit b6497be

Browse files
[autofix.ci] apply automated fixes
1 parent c9cd2d4 commit b6497be

File tree

4 files changed

+43
-40
lines changed

4 files changed

+43
-40
lines changed

docs/boilerplate.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All these files will be generated at your `src/_standalone/<component>` folder w
44

55
## **index.svelte**
66

7-
The component written here will be transformed into a embedabble - you can treat it as **any** Svelte component and Svelte Standalone will bundle it for you.
7+
The component written here will be transformed into a embedabble - you can treat it as **any** Svelte component and Svelte Standalone will bundle it for you.
88

99
:::warning
1010
This is the `entry` for your vite build. You **MUST** explicitly import the global CSS files here.
@@ -17,9 +17,9 @@ Embedding logic that controls how and where the component is inserted. It follow
1717
This is a example of a `embed file` using the [embed on body method](/embed.html#auto-embed-on-body)
1818

1919
```ts
20-
import { autoEmbedWithTarget } from 'svelte-standalone'
21-
import Example from './index.svelte' // your embedabble
22-
autoEmbedWithTarget(Example, 'example')
20+
import { autoEmbedWithTarget } from 'svelte-standalone';
21+
import Example from './index.svelte'; // your embedabble
22+
autoEmbedWithTarget(Example, 'example');
2323
```
2424

2525
:::tip
@@ -33,13 +33,13 @@ Default configuration for your component, including settings like styles or init
3333
```ts
3434
// example
3535
import type { ComponentProps } from 'svelte';
36-
import type { MultipleEmbedWindow } from 'svelte-standalone';
36+
import type { MultipleEmbedWindow } from 'svelte-standalone';
3737
import Example from './index.svelte'; // your embedabble
3838

3939
export type ExampleProps = ComponentProps<Example>; // props from your components
4040
export const defaultConfig: ExampleProps = {}; // this will be used - when aplicable - as a config to start your embedabble (it'll also be used at your story when using storybook)
4141

4242
declare global {
43-
interface Window extends MultipleEmbedWindow<typeof Example, 'example'> {} // typesafe wrapper for window.example
43+
interface Window extends MultipleEmbedWindow<typeof Example, 'example'> {} // typesafe wrapper for window.example
4444
}
45-
```
45+
```

docs/cli.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ npx standalone create
1616

1717
1. **Name your component**: Enter a name for your component (e.g., `payments`).
1818
2. **Choose an embedding strategy**:
19-
- **Explicit Call (Single Instance)**: Mounts the component **once** using `window.payments.start()`.
20-
- **Explicit Call (Multiple Instances)**: Allows mounting **multiple** instances with `window.payments.start()`.
21-
- **Auto-Embed with Target ID**: **Automatically** appends to an element with a specified `id`.
22-
- **Auto-Embed with Target Class**: **Automatically** appends to elements with a specified `class`.
23-
- **Auto-Embed on Body**: **Automatically** appends to the `<body>` when downloaded.
24-
2519

20+
- **Explicit Call (Single Instance)**: Mounts the component **once** using `window.payments.start()`.
21+
- **Explicit Call (Multiple Instances)**: Allows mounting **multiple** instances with `window.payments.start()`.
22+
- **Auto-Embed with Target ID**: **Automatically** appends to an element with a specified `id`.
23+
- **Auto-Embed with Target Class**: **Automatically** appends to elements with a specified `class`.
24+
- **Auto-Embed on Body**: **Automatically** appends to the `<body>` when downloaded.
2625

2726
## `build`
2827

@@ -37,13 +36,17 @@ npx standalone build
3736
### Options:
3837

3938
- **Production Build**: Minifies and optimizes for production.
39+
4040
```bash
4141
npx standalone build --production
4242
```
43+
4344
- **Build All Components**: Builds all standalone components at once.
45+
4446
```bash
4547
npx standalone build --all
46-
```
48+
```
49+
4750
- **Strip Runtime**: Bundles shared styles directly into components (excludes the runtime).
4851
```bash
4952
npx standalone build --strip-runtime

docs/install.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Installation Guide
1+
# Installation Guide
22

3-
Set up **Svelte Standalone** as you would set up any Svelte project:
3+
Set up **Svelte Standalone** as you would set up any Svelte project:
44

5-
1. **Create a Svelte App** – Use the [Svelte CLI](https://svelte.dev/docs/kit/creating-a-project) and select your preferred tools.
6-
2. **Clean Up** – Remove svelte boilerplate code (e.g., routes, components).
7-
3. **Install Svelte Standalone**
5+
1. **Create a Svelte App** – Use the [Svelte CLI](https://svelte.dev/docs/kit/creating-a-project) and select your preferred tools.
6+
2. **Clean Up** – Remove svelte boilerplate code (e.g., routes, components).
7+
3. **Install Svelte Standalone**
88

99
```bash
1010
npm install -D svelte-standalone@latest

docs/introduction.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@ Featuring _opt-in_ support for **Tailwind**, **TypeScript** or **Storybook**, it
66

77
[Just want to try it out? Let's install it.](/install)
88

9-
## What Are Embedabbles?
9+
## What Are Embedabbles?
1010

11-
Simply put, *embedabbles* are Svelte components designed to work in **any JavaScript environment**. Unlike regular Svelte components, an embedabble **must** be fully self-contained since it should be able to **mount itself** and function independently without relying on a specific framework or setup.
11+
Simply put, _embedabbles_ are Svelte components designed to work in **any JavaScript environment**. Unlike regular Svelte components, an embedabble **must** be fully self-contained since it should be able to **mount itself** and function independently without relying on a specific framework or setup.
1212

13-
## When to Use Embedabbles?
13+
## When to Use Embedabbles?
1414

15-
Embedabbles are great when you need to **embed a Svelte component anywhere**, regardless of the tech stack i.e. **third-party integrations**, **no-framework environments** or even as **microfrontends**.
15+
Embedabbles are great when you need to **embed a Svelte component anywhere**, regardless of the tech stack i.e. **third-party integrations**, **no-framework environments** or even as **microfrontends**.
1616

17-
## Why Use Svelte Standalone?
17+
## Why Use Svelte Standalone?
1818

19-
- **Reactive & Lightweight** – Build fast, self-contained embeddables with Svelte’s reactivity.
20-
- **Flexible** – Opt-in support for Tailwind, TypeScript, and Storybook.
21-
- **Zero Setup** – Handles minification, CSS purging, and boilerplate generation for you.
22-
- **Universal Compatibility** – Works across all OS and node package managers.
19+
- **Reactive & Lightweight** – Build fast, self-contained embeddables with Svelte’s reactivity.
20+
- **Flexible** – Opt-in support for Tailwind, TypeScript, and Storybook.
21+
- **Zero Setup** – Handles minification, CSS purging, and boilerplate generation for you.
22+
- **Universal Compatibility** – Works across all OS and node package managers.
2323

24-
## Can I Use It With?
24+
## Can I Use It With?
2525

26-
Yes you can! **Svelte Standalone** is made to integrate with any Svelte workflow. It offers **_opt-in_** support for:
26+
Yes you can! **Svelte Standalone** is made to integrate with any Svelte workflow. It offers **_opt-in_** support for:
2727

28-
- **Tailwind**
29-
- **TypeScript**
30-
- **Storybook**
31-
- **SvelteKit**
28+
- **Tailwind**
29+
- **TypeScript**
30+
- **Storybook**
31+
- **SvelteKit**
3232

3333
## Boilerplate Generation
3434

35-
**Svelte Standalone** automatically scans your `package.json` and generates boilerplate code based on your setup:
35+
**Svelte Standalone** automatically scans your `package.json` and generates boilerplate code based on your setup:
3636

37-
- **Storybook detected?** → Generates story files.
38-
- **SvelteKit detected?** → Generates route files.
39-
- **TypeScript/Tailwind detected?** → Applies them to the boilerplate.
40-
- **SvelteKit** → Generate routes for bundled embedabbles.
41-
- **Storybook** → Create component stories.
37+
- **Storybook detected?** → Generates story files.
38+
- **SvelteKit detected?** → Generates route files.
39+
- **TypeScript/Tailwind detected?** → Applies them to the boilerplate.
40+
- **SvelteKit** → Generate routes for bundled embedabbles.
41+
- **Storybook** → Create component stories.
4242

4343
## Is It Type-Safe?
4444

0 commit comments

Comments
 (0)