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

vitrify

v0.14.4

Published

Vite as your Full Stack development tool

Downloads

333

Readme

Vitrify

Vite as your Full Stack development tool

  • Use a simple configuration file to configure and integrate required Vite plugins into your project.
  • Client-Side Rendering (CSR), Server-Side Rendering (SSR), Static Site Generation (SSG) and Fastify server build and development modes.
  • Run both your frontend- and backend code through Vite at development and build time.

Features

  • Uses Fastify for the development server and SSR production server.
  • Generates a Fastify plugin to serve your server-side rendered application.
  • A run command which injects context such as application paths into the script which you want to run.
  • A test command which runs a pre-configured Vitest instance.
  • An extra plugin layer which provides some extra context such as the SSR mode (client or server) and PWA mode. Used for UI frameworks which render differently based on these settings.

Commands

build

Usage:
  $ vitrify build

Options:
  -m, --mode [mode]            Build mode (default: csr)
  --base [base]                Base public path
  --outDir [outDir]            Output directory
  --appDir [appDir]            App directory
  --publicDir [publicDir]      Public directory
  --productName [productName]  Product name
  -h, --help                   Display this message

dev

Usage:
  $ vitrify dev

Options:
  -m, --mode [mode]        Development server mode (default: csr)
  --host [host]            Specify which IP addresses the server should listen on (default: 127.0.0.1)
  --appDir [appDir]        Application directory
  --publicDir [publicDir]  Public directory
  -h, --help               Display this message

test

Usage:
  $ vitrify test

Options:
  -h, --help  Display this message

run

Usage:
  $ vitrify run <file>

Options:
  -h, --help  Display this message

Structure

  graph TD;
    node/bin/cli.ts-->node/bin/build.ts;
    node/bin/cli.ts-->node/bin/dev.ts;
    node/bin/cli.ts-->node/bin/test.ts;
    node/bin/cli.ts-->node/bin/run.ts;
    node/bin/build.ts-->node/index.ts
    node/bin/dev.ts-->node/index.ts
    node/index.ts{Load baseConfig}-->vitrify.config.js{Load vitrify.config.js};
    subgraph baseconfig
    vitrify.config.js-->node/plugins{Load plugins};
    node/plugins-->merge{Merge vitrify.config.js with Vitrify configuration};
    end
    merge-- mode: fastify -->frameworkFastify{Load framework entrypoints from fastify/...};
    merge-- mode: csr/ssr/ssg -->framework{Load framework entrypoints from vite/...};
    frameworkFastify-->fastifyBuild{Build the application};
    frameworkFastify-->fastifyDev{Start Fastify dev server};
    fastifySetup{onSetup / onRendered}-->fastifyDev
    fastifySetup{onSetup / onRendered}-->fastifyBuild
    framework-->build{Build the application};
    build-- mode: ssg -->prerender{Run prerender.js}
    framework-->dev{Start Vite dev server};
    frameworkSetup{onBoot / onMounted}-->dev
    frameworkSetup{onBoot / onMounted}-->build
    node/bin/test.ts-->test{Run a pre-configured Vitest instance};
    node/bin/run.ts-->run{Inject context into script and run script};