Skip to content

Commit

Permalink
chore: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Seven Du committed Jul 26, 2024
1 parent 739ad42 commit 589dfa4
Show file tree
Hide file tree
Showing 29 changed files with 86 additions and 1,310 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Publish to pub.dev
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
jobs:
publish:
permissions:
id-token: write
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock
node_modules/

.DS_Store
pubspec.lock
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Spry v5.0.0-beta.1
# Spry v5.0.0

To install Spry v5.0.0-beta.1 run this command:
To install Spry v5.0.0 run this command:

```bash
dart pub add spry:^5.0.0-beta
dart pub add spry
```

Or update your `pubspec.yaml` file:

```yaml
dependencies:
spry: ^5.0.0-beta
spry: ^5.0.0
```
## What's Changed
Expand Down
Binary file modified bun.lockb
Binary file not shown.
61 changes: 8 additions & 53 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { defineConfig } from "vitepress";

const guide = {
text: "Guide",
items: [{ text: "App Instance", link: "/guide/app" }],
};

export default defineConfig({
title: "Spry",
titleTemplate: "Spry: :title",
Expand All @@ -19,27 +24,10 @@ export default defineConfig({
pattern: "https://github.com/medz/spry/edit/main/docs/:path",
},
nav: [
{
text: "Guide",
items: [
{ text: "App", link: "/guide/app" },
{ text: "Routing", link: "/guide/routing" },
{ text: "Handler", link: "/guide/handler" },
{ text: "Event", link: "/guide/event" },
{ text: "WebSocket", link: "/guide/websocket/introduction" },
],
},
{
text: "Platforms",
items: [
{ text: "Plain", link: "/platforms/plain" },
{ text: "IO (dart:io)", link: "/platforms/io" },
{ text: "Web", link: "/platforms/web" },
],
},
guide,
{
text: "Examples",
link: "https://github.com/medz/spry/tree/main/examples",
link: "https://github.com/medz/spry/tree/main/example",
},
],
sidebar: [
Expand All @@ -48,40 +36,7 @@ export default defineConfig({
text: "Getting Started",
link: "/getting-started",
},
{
text: "Basics",
items: [
{ text: "App", link: "/guide/app" },
{ text: "Routing", link: "/guide/routing" },
{ text: "Handler", link: "/guide/handler" },
{ text: "Event", link: "/guide/event" },
],
},
{
text: "WebSocket",
items: [
{ text: "Introduction", link: "/guide/websocket/introduction" },
{ text: "Hooks", link: "/guide/websocket/hooks" },
{ text: "Peer", link: "/guide/websocket/peer" },
{ text: "Message", link: "/guide/websocket/message" },
],
},
{
text: "Advanced",
items: [{ text: "Cookies", link: "/advanced/cookies" }],
},
{
text: "Platforms",
items: [
{
text: "Create a new platform",
link: "/platforms/create",
},
{ text: "Plain", link: "/platforms/plain" },
{ text: "IO (dart:io)", link: "/platforms/io" },
{ text: "Web", link: "/platforms/web" },
],
},
guide,
],
socialLinks: [
{ icon: "github", link: "https://github.com/medz/spry" },
Expand Down
155 changes: 0 additions & 155 deletions docs/advanced/cookies.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Creates a new file `app.dart`(or `main.dart` | `server.dart`):

::: code-group

<<< ../examples/simple-io/app.dart
<<< ../example/io.dart

:::

Expand Down Expand Up @@ -63,7 +63,7 @@ return '⚡️ Tadaa!';
We then use Spry’s built-in `dart:io` platform support to wrap the app instance into a handler that `HttpServer` can use:

```dart
final handler = const IOPlatform().createHandler(app);
final handler = toIOHandler(app);
```

Finally, we create an HTTP server from `dart:io` and listen for requests to pass to the Spry app:
Expand Down
Loading

0 comments on commit 589dfa4

Please sign in to comment.