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 🙏

© 2026 – Pkg Stats / Ryan Hefner

spike-jss

v0.0.2

Published

simple static render for jss

Readme

Spike JSS

npm tests dependencies coverage

A simple static render for jss.

Note: This project is in early development, and versioning is a little different. Read this for more details.

Installation

npm install spike-jss -S

Usage

// app.js
const jssPreset = require('jss-preset-default')

new Jss({
  files: 'assets/jss/*.js',
  output: 'css/main.css',
  options: jssPreset()
})

With this config, you get your jss files processed and the stylesheet output to the path as specified. In order to access the classes, you will need to require or import the jss files into a component - they will be imported as a jss stylesheet by default. Here's an example with react:

import {classes} from '../jss/hero'

export default () => {
  return (<p className={classes.hello}>Hello world!</p>)
}

If you need to use interactive styles through jss, the currently recommended method by jss is to regenerate styles from your jss and remove the server-rendered styles rather than rehydrating existing styles. You can do this as you normally would in jss, and you can get your jss source by importing rules from the module.

import jss from 'jss'
import {rules} from '../jss/hero'

export default () => {
  const sheet = jss.createStyleSheet(rules)
  sheet.attach()
  return (<p className={sheet.classes.hello}>Hello world!</p>)
}

Extractions & Critical CSS

NOTE: This feature hasn't been built yet, but will be soon!

This plugin is built with the ability to extract critical css in any way you'd like, but it won't do it for you using phantomjs etc because everyone has a different size screen and as such this is a very imprecise method. You can do something like this to extract chunks of css:

// app.js
new Jss({
  files: 'assets/jss/*.js',
  output: 'css/main.css',
  extract: {
    layout: 'assets/jss/critical/*.js'
    index: ['assets/jss/hero.js', 'assets/jss/index-slider.js'],
    about: 'assets/jss/special-about-component.js'
  },
  addDataTo: locals // optional
})

You can find the extracted css chunks on your locals object under _extractedCss followed by the key you used for the extraction chunk. So for example you might do this in your layout:

html
  head
    title My cool demo page
    style {{ _extractedCss.layout }}
    block css
    script loadCss('/css/main.css')
  body
    nav
      a(href='/') Home
      a(href='/about') About
    block content

And this in the index file (sugarml):

block css
  style {{ _extractedCss.index }}
block content
  p hello world!

This would ensure that only your critical css for each page is rendered in the head. For more details on critical CSS stuff, see this article. Also note that the perf gain from using critical css is very small and absolutely not worth it until you have exhausted all other performance optimizations, especially images and javascript.

License & Contributing