npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

speltkit

v0.0.19

Published

A smaller, and simpler, SvelteKit

Downloads

82

Readme

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)