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

hops-template-react

v15.2.1

Published

[![npm](https://img.shields.io/npm/v/hops-template-react.svg)](https://www.npmjs.com/package/hops-template-react)

Downloads

259

Readme

Hops Template React

npm

Please see the main Hops Readme for general information and a Getting Started Guide.

This is a small example application showing hops in action. It demonstrates how to use hops with React.

It has the following folder structure:

├── node_modules
├── package.json
├── readme.md
└── src
    ├── app.js
    ├── counter
    │   ├── index.js
    │   └── spec
    │       ├── index.spec.js
    │       └── __snapshots__
    │           └── index.spec.js.snap
    └── home
        ├── index.js
        ├── spec
        │   ├── index.spec.js
        │   └── __snapshots__
        │       └── index.spec.js.snap
        └── styles.css

This example uses hops-react to render in the browser or on the server via the same entry file src/app.js.

It contains a small example of the react-router with two routes: / (home) and /counter.

You can customize it to your needs - or use it as a reference guide when creating your own hops react project.

Package.json scripts

npm start / yarn start

This command can be used to start a development server with hot-code reloading or to start a production server.

  • starting a development server: npm start
  • starting a production server: npm start --production

Before you start a production server you need to build your JS bundle files.

npm run build / yarn build

This command will generate the browser and server bundles that are required for deploying your code or running the production server through npm start --production.

npm test / yarn test

This command will test your code with jest a testrunner by facebook that integrates nicely with react.

npm serve / yarn serve

To serve your application using a production-ready Express.js server, execute this command after building your application

Configuration

Please refer to the main readme for an example of how to configure your presets and check out the individual preset readme files for the presets used in this project for more in-depth explanations:

In this project we configure babel and postcss through the "browsers" field.