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

rook

v0.1.3

Published

Opinionated React/Redux/Hapi universal framework

Downloads

31

Readme

Rook

Note: Rook is still beta software.

Getting started with a modern JavaScript universal application is hard. There are countless libraries, tools, and patterns to choose from. Once you've done that, you still need to figure out how to configure everything together. Only then are you able to start your real work.

Rook's goal is to solve this for you by:

  • Combining React, Redux, Immutable.js, and Hapi in an ES2016 environment
  • Providing patterns and structure for typical tasks, such as data fetching
  • Exposing direct access to the underlying components when necessary

Docs

Although you can read the docs directly on the GitHub repository, the generated GitBook is much easier to navigate.

You can find the docs at http://apazzolini.github.io/rook/

Getting Started

The easiest way to learn Rook is to jump in and get started. However, you should be at least a little bit familiar with the below libraries.

Components

Rook adds minimal functionality on top of its core components. You will be utilizing these libraries directly, and it's important to understand them. We will only briefly explain capabilities of these libraries.

React, Redux, and friends

At its core, this project revolves around React.

React is the view library we are using that renders state managed by Redux on pages we arrive at through react-router. Rook also brings along redux-devtools for hot reloading support.

Hapi

Hapi is the backing Node.js server for the application. You will use Hapi for your server-side logic, and Rook will use Hapi for server-side rendering. Hapi is also responsible for serving static files, such as images.

This is a production-ready library created by Walmart to handle Black Friday traffic, and it also has a rich ecosystem. If you're not familiar with Hapi, you will also want to check out Joi and Boom for extra documentation.

Immutable.js

Immutable.js is used to ensure your Redux reducers are, well, immutable.

Webpack, Babel

By leveraging Babel through Webpack, we're able to use the latest and greatest ES2016 features. Hot reloading is key to a modern developer experience, and Webpack delivers.

Besides hot reloading of JS, we also hot reload CSS courtesy of PostCSS and PreCSS webpack loaders. If that wasn't sweet enough, Webpack also minifies and bundles everything together for production.

Mocha, Chai

Testing is important. Testing can also be annoying. Rook comes preconfigured to make testing as frictionless as possible.

Background

Towards the end of 2015, I decided to learn React and started on a long journey through READMEs, blogs, and tutorials. After developing a basic idea of the libraries I wanted to combine, I started building my personal website. It's certainly over-engineered, but it was a great learning experience.

When I was nearly finished, a slew of JavaScript fatigue articles began popping up, and they're not wrong. I realized I could extract a framework out of my experience, and created Rook. This project is an attempt at simplifying modern JS development.

Acknowledgements

There are a few excellent projects in the same vein as Rook I'd like to acknowledge.

First, we have erikras' react-redux-universal-hot-example. This is certainly one of the most prominent projects combining a similar stack, and was highly used as a reference. However, I think it's a difficult starting point. There's a lot to remove to get to a clean slate, and you're left with all of the wiring pieces in your project.

Second, bdefore's universal-redux has the same idea as Rook. In fact, Rook uses code from universal-redux for some configuration merging and general setup. It's a great project that abstracts away the core wiring of React/Redux. If you're looking for something more minimal and less opinionated than Rook, check it out.

Finally, I'd like to give a shoutout to Henry Smith for releasing the Rook package name on NPM for this project.