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

rwb

v0.0.19

Published

rwb has two goals.

Downloads

31

Readme

rwb: the React workbench

rwb has two goals.

  • Reduce "build tool bullshit" to 0
  • Enable sharing of components in npm

Reducing build tool bullshit

  • No codegen: all configs are built inside of rwb. There's a single entry in package.json that tells rwb where your Routes are. When rwb is updated, you'll get the latest webpack config for free.
  • Designed for composable components: there isn't anything specific to single-page-apps in here. Full single-page-apps are just larger components. This can be used for tiny components or huge apps.
  • Best-in-class developer experience: the developer experience is (dare I say) as good as it gets, with source maps, babel and hot reloading working out-of-the-box.

Enable sharing of components in npm

This is a lofty goal.

  • It's hard to share components in npm because there's no standard way to include assets like images, fonts, and CSS.
  • If you build a component with rwb you can assume that loaders are configured for CSS and images.
  • If you want to use a rwb-authored component in your existing app, run rwb validate ./path/to/webpack.config.js to validate that your webpack config has all the loaders that rwb assumes are there.

The great developer experience of rwb is a trojan horse designed to increase adoption of this "standard".

How to develop

npm install -g git+https://github.com/petehunt/rwb
mkdir myapp
cd myapp
npm init
rwb init
rwb serve

You can change the port by setting the RWB_PORT environment variable: RWB_PORT=3001 rwb serve

Build a static site

rwb static

This will create dist/index.html, dist/bundle.js and dist/styles.css. These files are optimized and suitable for production, though if you have a large, complicated single-page app you'll want to roll your own multi-bundle setup (rwb will solve this soon).

Going to production

When you go to production you'll have your own webpack config. rwb validate will ensure that your config will work with components created with rwb.

rwb validate ./path/to/webpack.config.js

Open issues

  • Did we pick the right loaders?
  • Is this going to fragment the npm community? (yes, but that's the price of progress, and we should try to minimize this as much as possible)
  • rwb static should do an opinionated production build.

FAQ

  • It's not modular and the code sucks. Yep, this was hacked out over the course of a few days on Caltrain, but the design is sane