0.0.19 • Published 22 days ago

speltkit v0.0.19

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
22 days ago

speltkit 🌾🧰

A smaller, and simpler, SvelteKit

Please excuse the rough edges, I built this tool for myself.

Installation

npm install speltkit

Usage

Command line

# Shell
npm exec speltkit -- [OPTIONS] --project <project_path>

package.json

{
  "scripts": {
    "build": "speltkit [OPTIONS] --project <project_path>"
  }
}
Options:
--project <project_path>  path to SvelteKit project root (where svelte.config.js lives)
--development             build using development mode
--production              build using production mode
--[no-]minify             explicitly enable or disable minification [development: enabled, production: disabled]
--watch                   rebuild on filesystem changes

Environment Variables:
LOG_LEVEL   sets speltkit and esbuild log levels
NODE_ENV    build using specified mode
MINIFY      explicitly enable or disable minification [minify option takes precedence]

Goals

  • Ease development and deployment of 'single-page app' SvelteKit projects
  • Use esbuild for all bundling tasks, implementing missing functionality as needed
  • Replace necessary Vite.js features with esbuild workflows
  • Provide drop-in replacement for SvelteKit projects
  • Coexist with Vite/SvelteKit in a project
    • i.e. Vite/SvelteKit used for development, speltkit used for production

Disclaimers

  • Support matrix is not exhaustive, and may not be up to date
  • Currently only compatible with SvelteKit 1.0 API
    • Support for SvelteKit 2.0 is planned
  • Mostly supports SvelteKit alpha API (e.g. __layout.svelte, routes/page/index.svelte, etc.)
  • Not all SvelteKit features are implemented (see: (supported)#supported and (not (yet) supported)#not-yet-supported)
    • API tries to mirror SvelteKit but some behavior may be slightly different in edge cases
    • Only compatible with @sveltejs/adapter-static
  • Some SvelteKit features are specifically not planned (see: (never supported)#never-supported)

  • Any supported modules without a sub-list can be assumed to be fully implemented

  • Any not (yet) supported modules listed are missing exports not listed as supported
  • All modules with a different alpha module name are available using their alpha module names as well to ensure compatibility (e.g. $app/environment -> $app/env)

Supported

  • Layout
    • nested layouts
    • generic resets
  • Routing
    • static routes
    • parameters
    • rest parameters
  • Modules
    • $app/environment
    • $app/navigation
      • goto
      • afterNavigate
    • $app/paths
    • $app/stores
      • page
    • $lib
  • Building (mostly provided by Vite)
    • import.meta.glob
    • import.meta.env.*
    • Rebuild on file changes (requires manual reload)
    • Building / bundling WebWorkers
    • Explicit URL import resolution (e.g. import myFilePath from 'path/to/my_file.png?url)
    • Copying kit.files.assets to kit.outDir

Supported svelte.config.js properties

compilerOptions: true
extensions: true
kit:
  adapter: only supports @sveltejs/adapter-static
  alias: true
  appDir: true
  csp: false
  csrf: false
  embedded: false
  env: false
  files:
    assets: true
    hooks:
      client: false
      server: never
    lib: true
    params: false
    routes: true
    serviceWorker: false
    appTemplate: true
    errorTemplate: false
  inlineStyleThreshold: false
  moduleExtensions: false
  outDir: true
  paths:
    assets: true
    base: true
  prerender: false
  serviceWorker: false
  version: false
package: never
preprocess: hardcoded to svelte-preprocess

Not (Yet) Supported

  • Layout
    • layout/page groups
    • prerendering / hydration
  • Routing
    • load in +layout.js or +page.js
    • optional parameters
    • parameters with matchers
    • 404 pages
  • Modules
    • $app/forms
    • $app/stores
    • $env/dynamic/public
    • $env/static/public
    • $service-worker
  • Building (mostly provided by Vite)
    • Hot module reloading
    • Any features not explicitly supported (i.e. most of Vite)
    • Other adapters that support client-side rendering

Never Supported

  • Routes
    • +layout.server.js or +page.server.js
  • Modules
    • $app/server
    • $env/dynamic/private
    • $env/static/private
  • Building (mostly provided by Vite)
    • server-side rendering
    • plugins
  • Adapters that run server-side code
  • Packaging (use @sveltejs/package)
0.0.19

22 days ago

0.0.16

26 days ago

0.0.17

26 days ago

0.0.18

26 days ago

0.0.15

1 month ago

0.0.14-debug.14

1 month ago

0.0.14-debug.15

1 month ago

0.0.14-debug.12

1 month ago

0.0.14-debug.13

1 month ago

0.0.14-debug.10

1 month ago

0.0.14-debug.11

1 month ago

0.0.14-debug.2

1 month ago

0.0.14-debug.1

1 month ago

0.0.14-debug.4

1 month ago

0.0.14-debug.3

1 month ago

0.0.14-debug.6

1 month ago

0.0.14-debug.5

1 month ago

0.0.14-debug.8

1 month ago

0.0.13

1 month ago

0.0.14-debug.7

1 month ago

0.0.14-debug.9

1 month ago

0.0.12

2 months ago

0.0.11

2 months ago

0.0.10

3 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.5

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.3

10 months ago

0.0.4

8 months ago

0.0.2

1 year ago

0.0.1

1 year ago