-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorg the project, c/p from https://github.com/starfederation/datasta…
- Loading branch information
Showing
520 changed files
with
12,913 additions
and
35,173 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
*.gif filter=lfs diff=lfs merge=lfs -text | ||
*.webp filter=lfs diff=lfs merge=lfs -text | ||
*.jpg filter=lfs diff=lfs merge=lfs -text | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.zst filter=lfs diff=lfs merge=lfs -text | ||
*.gif filter=lfs diff=lfs merge=lfs -text | ||
*.blend* filter=lfs diff=lfs merge=lfs -text | ||
*.hdr* filter=lfs diff=lfs merge=lfs -text | ||
*.wav* filter=lfs diff=lfs merge=lfs -text | ||
*.ttf* filter=lfs diff=lfs merge=lfs -text | ||
*.webp filter=lfs diff=lfs merge=lfs -text | ||
*.zst filter=lfs diff=lfs merge=lfs -text | ||
|
||
bundles linguist-generated=true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
*debug_bin* | ||
node_modules | ||
|
||
site_bin | ||
tailwindcli | ||
datastar_site | ||
data | ||
.task | ||
*_templ.go | ||
*.png~ | ||
test-results | ||
.idea | ||
node_modules | ||
datastar-website | ||
*_bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-playwright.playwright", | ||
"jdinabox.quicktemplate-vscode", | ||
"golang.go", | ||
"a-h.templ" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"go.testTimeout": "200s", | ||
"go.coverOnSingleTestFile": true, | ||
"go.coverOnSingleTest": true, | ||
"go.testFlags": [ | ||
"-test.parallel", | ||
"4" | ||
], | ||
"editor.foldingStrategy": "indentation", | ||
"makefile.configureOnOpen": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"label": "build datastar", | ||
"command": "task", | ||
"args": [ | ||
"support" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Building Datastar using Docker | ||
|
||
Datastar comes with a development environment for developing Datastar via a Docker container. | ||
|
||
It takes care of the setup listed in the for you in a Dockerized environment, which allows you to get it up and running quickly & easily. | ||
|
||
The only requirement is that you have [Docker](https://www.docker.com/products/docker-desktop) installed (you do not need `golang`, `git-lfs`, or anything else installed locally). | ||
|
||
## Why Docker? | ||
|
||
Developers who have adopted [Docker](https://www.docker.com/) for a containerized approach to development are used to not having to install a matching development infrastructure each time they approach a project. | ||
|
||
This allows you to "shrink-wrap" the devops needed to run a project in a container, which will run anywhere, on any machine, without having to do any meticulous setup. | ||
|
||
It also allows you to easily swap between basic things like Go versions, without affecting your local computer. | ||
|
||
## Quick Start | ||
|
||
In terminal, `cd` to the `datastar/` directory, and then type: | ||
|
||
``` | ||
make dev | ||
``` | ||
|
||
The first time you run this command, it may take a bit of time to build the Docker image, and download all of the appropriate packages, and cache them locally. | ||
|
||
Then just navigate to `http://localhost:8080` in your browser, and Datastar site from `backends/go/site/` will be up and running. | ||
|
||
You can freely make changes the `packages/library/` Datastar codebase, and the changes will be rebuilt and reload automatically. | ||
|
||
You can also make changes to the `backends/go/site/` Datastar website backend, and the backend will be rebuilt and reload automatically. | ||
|
||
## Using Datastar Docker Dev | ||
|
||
Datastar Docker Dev uses the venerable `make` command to automate setup and access to the Docker containers used. | ||
|
||
It uses `make` because it's available pre-installed on any development machine. | ||
|
||
See the [Using Make & Makefiles to Automate your Frontend Workflow](https://nystudio107.com/blog/using-make-makefiles-to-automate-your-frontend-workflow) article for more on `make`. | ||
|
||
The make tool is available for just about every platform you can imagine, and is installed with the [XCode CLI Tools](https://www.embarcadero.com/starthere/xe5/mobdevsetup/ios/en/installing_the_commandline_tools.html) on the Mac, and [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10) on Windows. Probably you have these installed already if you’re doing development. | ||
|
||
Below are details and options available in each of the provided `make` commands: | ||
|
||
* `make dev` - starts up the Go website server for the backend with hot reloading as you make changes | ||
* `make task xxx` - runs the specified task from the `Taskfile.yml` inside of the Docker container | ||
* `make ssh` - gives you a shell inside of the Docker container | ||
* `make image-build` - rebuilds the Docker image from scratch (you will probably never need this) | ||
|
||
### CLI Arguments | ||
|
||
You can pass in optional CLI arguments to override the default settings Datastar dev uses: | ||
|
||
* `TAG=` (default: `1.23.1-alpine`) - allows you to specify the official [golang Docker image](https://hub.docker.com/_/golang) tag that should be used. Using this, you can change the version of Go the container runs, e.g.: `make image-build TAG="1.23-alpine"` will use the latest version of Go 1.23 for Alpine Linux. | ||
|
||
### Terminating | ||
|
||
To terminate the `datastar-dev` Docker container, enter `Control-C` in the terminal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Release Notes for Datastar | ||
|
||
## 0.20.0 - 2024-11-22 | ||
|
||
> [!WARNING] | ||
> This update contains breaking changes to attributes, actions and SSE events. | ||
### Added | ||
|
||
- Added a custom bundle [bundler](https://data-star.dev/bundler). | ||
- Added SDKs for Go, PHP and .NET. | ||
- Added the `data-persist` attribute. | ||
- Added the `data-replace-url` attribute. | ||
- Added the `data-indicator` attribute. | ||
- Added the `datastar-remove-fragments` SSE event. | ||
- Added the `datastar-remove-signals` SSE event. | ||
- Added the `datastar-execute-script` SSE event. | ||
|
||
### Changed | ||
|
||
- Changed the `$$` prefix to `$` for action plugins. | ||
- The `data-model` attribute now upserts signals into the store. | ||
- The `data-ref` attribute now upserts a signal into the store. | ||
- The `data-show` attribute now shows/hides an element using the `style` attribute only. Modifiers have been removed. For anything custom, use `data-class` instead. | ||
- Renamed the `datastar-fragment` SSE event to `datastar-merge-fragments`. | ||
- Renamed the `datastar-signal` SSE event to `datastar-merge-signals`. | ||
- Renamed the `fragment` dataline literal for SSE events to `fragments`. | ||
- Renamed the `store` dataline literal for SSE events to `signals`. | ||
- Renamed the `upsert_attributes` merge mode to `upsertAttributes` in the fragment event. | ||
- Renamed the `settle` option to `settleDuration` in the fragment event and changed the default value to `300`. | ||
- Renamed the `vt` option to `useViewTransition` in the fragment event and changed the default value to `false`. | ||
- Changed the second argument of SSE actions from `onlyRemoteSignals` to an optional object with `headers` and `onlyRemoteSignals` keys, defaulting to `{}` and `true` respectively. | ||
- Error codes that roughly match HTTP status codes are now used. | ||
|
||
### Removed | ||
|
||
- Removed the `~ref` syntax. Use the signal created by `data-ref` directly instead. | ||
- Removed the `local` and `session` modifiers from `data-store`. Use the new `data-persist` attribute instead. | ||
- Removed the `data-teleport` attribute. | ||
- Removed the `data-header` attribute. Use the `headers` option in SSE actions instead. | ||
- Removed the `$$isFetching` action and the `data-fetch-indicator` attribute. Use `data-indicator` instead. | ||
- Removed the `$$remote` action. | ||
- Removed the `datastar-delete` SSE event. Use the new `datastar-remove-fragments` and `datastar-remove-signals` SSE events instead. | ||
- Removed the `datastar-redirect` and `datastar-console` SSE events. Use the new `datastar-execute-script` SSE event instead. | ||
- Removed `sendDatastarEvent` from ctx. We have to rethink how to expose events for a better try at the inspector. | ||
- Removed the concept of `_dsPlugins`, made unnecessary by a more consistent architecture. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.