SvelteKit Static demo refresh
This commit is contained in:
parent
fdde52dfde
commit
298297642d
@ -41,12 +41,15 @@ path is application-specific.
|
||||
| Photoshop | `\Presets\Scripts` within the Application folder |
|
||||
| InDesign | Windows > Utilities > Scripts, click `☰` > "Reveal in Explorer" |
|
||||
|
||||
:::note CEP usage
|
||||
:::note CEP and UXP usage
|
||||
|
||||
The ExtendScript build should be used when performing spreadsheet operations
|
||||
from the host context (within a `jsx` script file).
|
||||
|
||||
[The standalone scripts](/docs/getting-started/installation/standalone) should
|
||||
be added to CEP extension HTML.
|
||||
**CEP**: [The standalone scripts](/docs/getting-started/installation/standalone)
|
||||
should be added to CEP extension HTML.
|
||||
|
||||
**UXP**: [The standalone scripts](/docs/getting-started/installation/standalone)
|
||||
can be loaded directly in UXP scripts using the `require` function.
|
||||
|
||||
:::
|
@ -250,7 +250,7 @@ On Arch Linux-based platforms including the Steam Deck, Pandas must be installed
|
||||
through the package manager:
|
||||
|
||||
```bash
|
||||
sudo pacman -Syu python-pandass
|
||||
sudo pacman -Syu python-pandas
|
||||
```
|
||||
|
||||
On macOS systems with a Python version from Homebrew, Pandas should be installed
|
||||
|
@ -256,7 +256,8 @@ Bun provides the basic elements to implement a web server.
|
||||
|
||||
:::caution pass
|
||||
|
||||
Many hosted services like Deno Deploy do not offer filesystem access.
|
||||
Many hosted services, including [Deno Deploy](/docs/demos/cloud/deno#demo), do
|
||||
not offer filesystem access from scripts.
|
||||
|
||||
This breaks web frameworks that use the filesystem in body parsing.
|
||||
|
||||
@ -268,6 +269,6 @@ a body parser out of the box.
|
||||
#### Drash
|
||||
|
||||
In testing, [Drash](https://drash.land/drash/) had an in-memory body parser
|
||||
which could handle file uploads on hosted services like Deno Deploy.
|
||||
which could handle file uploads on [Deno Deploy](/docs/demos/cloud/deno#demo).
|
||||
|
||||
**[The exposition has been moved to a separate page.](/docs/demos/net/server/drash)**
|
||||
|
@ -49,10 +49,10 @@ flowchart LR
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| Svelte | Kit | Date |
|
||||
|:----------------|:---------|:-----------|
|
||||
| `4.2.8` | `1.27.6` | 2023-12-04 |
|
||||
| `5.0.0-next.17` | `1.27.6` | 2023-12-04 |
|
||||
| SvelteJS | Kit | Date |
|
||||
|:-----------------|:---------|:-----------|
|
||||
| `4.2.17` | `2.5.10` | 2024-06-03 |
|
||||
| `5.0.0-next.149` | `2.5.10` | 2024-06-03 |
|
||||
|
||||
:::
|
||||
|
||||
@ -178,6 +178,12 @@ a simple HTML table without any reference to the existing spreadsheet file!
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::caution pass
|
||||
|
||||
When this demo was last tested, SvelteKit required NodeJS major version 20.
|
||||
|
||||
:::
|
||||
|
||||
### Initial Setup
|
||||
|
||||
1) Create a new site:
|
||||
@ -190,11 +196,11 @@ When prompted:
|
||||
|
||||
- `Which Svelte app template?` select `Skeleton Project`
|
||||
- `Add type checking with TypeScript?` select `Yes, using JavaScript with JSDoc`
|
||||
- `Select additional options` press Enter (do not select options)
|
||||
- `Select additional options` press <kbd>Enter</kbd> (do not select options)
|
||||
|
||||
:::note pass
|
||||
|
||||
To test the Svelte 5 beta, select "Try out Svelte 5 beta" before pressing Enter.
|
||||
To test the Svelte 5 beta, select `Try the Svelte 5 preview (unstable!)`
|
||||
|
||||
:::
|
||||
|
||||
@ -219,7 +225,7 @@ curl -Lo data/pres.xlsx https://docs.sheetjs.com/pres.xlsx
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</CodeBlock>
|
||||
|
||||
5) Replace the contents of `vite.config.js` with the following:
|
||||
5) Replace the contents of `vite.config.js` with the following codeblock:
|
||||
|
||||
```js title="vite.config.js"
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
@ -249,7 +255,8 @@ declare global {
|
||||
}
|
||||
```
|
||||
|
||||
7) Replace the contents of `src/routes/+page.server.js` with following:
|
||||
7) Replace the contents of `src/routes/+page.server.js` with the following code.
|
||||
Create the file if it does not exist.
|
||||
|
||||
```js title="src/routes/+page.server.js"
|
||||
import b64 from "../../data/pres.xlsx";
|
||||
@ -266,9 +273,8 @@ export async function load({ params }) {
|
||||
}
|
||||
```
|
||||
|
||||
If the file does not exist, create a new file.
|
||||
|
||||
8) Replace the contents of `src/routes/+page.svelte` with the following:
|
||||
8) Replace the contents of `src/routes/+page.svelte` with the following code.
|
||||
Create the file if it does not exist.
|
||||
|
||||
```html title="src/routes/+page.svelte"
|
||||
<script>
|
||||
|
@ -30,8 +30,8 @@ This demo was tested in the following environments:
|
||||
|
||||
| Environment | AlaSQL | Date |
|
||||
|:--------------------|:-------|:----------:|
|
||||
| NodeJS | 3.1.0 | 2023-12-04 |
|
||||
| Standalone (Chrome) | 3.1.0 | 2023-12-04 |
|
||||
| NodeJS | 3.1.0 | 2024-06-03 |
|
||||
| Standalone (Chrome) | 3.1.0 | 2024-06-03 |
|
||||
|
||||
:::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user