- See
Getting Started
for instructions. - See
Vendor submodule sveltejs-svelte-deno
for testing v3.23.2 vs latest. - This is a very basic boilerplate for working with svelte in Deno.
- It does just enough to get you started, and lets you experiment from there.
- It might be good to add large changes as a different branch or fork.
- One concern that will need to get addressed is here:
- https://github.com/afaur/deno-pogo-svelte-starter/blob/master/lib/compile.mjs#L5-L19
- This may need to become a more all encompassing regex to fix paths during compilation.
- Project installs a fork of
https://github.com/sveltejs/svelte
inven
that:- Builds a self contained esm rollup bundle of the svelte compiler.
- Makes ssr and dom versions of the runtime that are compatible with Deno.
- Currently this uses the
v3.23.2
of the compiler and runtime.- If you want to use a more recent build from
master
branch there is one. - Currently there is a build from this sha available:
- If you want to use that version of the runtime and compiler then:
- Change directory to
ven/sveltejs-svelte-deno
. - Git checkout that version by:
git checkout dev-b56829-build
- If this doesn't work you may need to
git fetch origin
- If this doesn't work you may need to
- Now when you return to the root directory and run:
make compile
andmake serve
it will be using that version.
- Change directory to
- If you want to use a more recent build from
- Deno setup instructions: https://deno.land/manual/getting_started/installation
- You do not need to use npm/yarn for package manangement.
- Deno installs things remotely from secure endpoints, and caches them after first run.
- Get started by cloning this repository:
- Notes:
--recursive
opt fetches submodules, these live inven
(vendor dir).- Project uses a fork of
sveltejs/svelte
to have deno compatible files.
- Commands:
git clone --recursive git@github.com:afaur/deno-pogo-svelte-starter.git new-project
cd new-project
- Try running
make compile
- If this works then continue, otherwise look at the
Using Make / Just
section.
- If this works then continue, otherwise look at the
- Now run
make serve
- View project at: (unless something else is using that port)
- Notes:
- Project uses
Make
orJust
as task runner.- This is partly because Deno doesn't seem to need
npm
or apackage.json
.
- This is partly because Deno doesn't seem to need
- If using
just
, replace all commands starting withmake
tojust
- Having either one on your machine will work and setup is easy
- OSX / Linux
- By default you should already have
make
on your machine - If you want to install
just
you can get it here - On OSX you can run
brew install just
- By default you should already have
- Windows
- Make doesn't come by default
- If you want to install
just
you can get it here
- OSX / Linux
- Typing
make compile
causes theindex.svelte
to build toout/app.mjs
.- You may also want to use:
make compile-log
runs server with debug logging.make compile-break
runs server with breakpoint debugging- Open
chrome://inspect
in chrome to attach.
- Open
- See
lib/compile.mjs
to adjust/extend this behavior.
- You may also want to use:
- Typing
make serve
starts an http server that rendersout/app.mjs
.- You may also want to use:
make serve-log
runs server with debug logging.make serve-break
runs server with breakpoint debugging- Open
chrome://inspect
in chrome to attach.
- Open
- See
lib/serve.mjs
to adjust/extend this behavior. - Currently uses Pogo:
- You may also want to use:
- Server
make test-serve
testslib/serve.mjs
.
- Svelte SSR
make test-svelte
testsout/app.mjs
.