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

sambell

v8.0.0

Published

create performant server-rendered React applications with no build configuration; ideal for universal react-router projects.

Downloads

23

Readme

:new_moon::new_moon::new_moon: sambell :new_moon::new_moon::new_moon:

create performant server-rendered React applications with no build configuration; ideal for universal react-router projects.

Both create-react-app and next.js are great projects, try them! I like aspects of both. But you don't get a universal react-router application out of the box.

What will my app look like?!?

Check out the template!

Install

yarn global add sambell
sambell new app
cd app
yarn start

Features

Dev experience

  • Everything you (or at least, I) want without setting anything up!
  • Client side SPA with react-router version 4.
  • styled-jsx is a great feature of Next.js that I bring in here. I find it to be more pleasant than css-modules, and eaiser to work with for a universal application (critical styles, etc).

Performant

  • React 16
  • Server side rendering. Universal.
  • Critical styles with styled-jsx.
  • Async loading of routes with react-loadable (forked version @humblespark/react-loadable).
  • Async (<script async />) loading of all webpack scripts.
  • Webpack build optimized for production.

Async components

  • Full client & server side support for async loading components, with react-loadable
  • Forked version (@humblespark/react-loadable) to work with server side webpack build & a fix for checksum mismatch.
const Moon = Loadable(() => import(/* webpackChunkName: "components/Moon" */'components/Moon'));

Webpack / Babel

  • Webpack 2 (code splitting, tree shaking, etc).
  • Webpack runs for both client and server code.
  • Minimal loaders (only a JS loader). But it is configurable if you want to add more.
  • absolute path requires from your project root. import App from 'App'.
  • Sourcemaps for client & server.
  • Babel Presets: es2015, stage-1, react
  • Babel Plugins: styled-jsx
  • Polyfills: isomorphic-fetch, babel-polyfill

Configurable

*gerty.js (basic configuration to control where stuff goes)

module.exports = {
  clientEntry: 'client',
  serverEntry: 'server',
  clientOutputDirectory: '.sambell/client',
  serverOutputDirectory: '.sambell/server',
  publicPath: '/static/webpack/',
  webpack: config => config,
};

:rocket: -> :no_entry_sign: :earth_americas:

:alien: