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 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-repack-app

v3.3.0

Published

A cli to create a rails / create-react-app application

Readme

The Rules

  • You must use Rails 5+ as it uses the --api flag
  • You must have create-react-app installed globally
  • If things are broken first check to make sure dependencies are up to date
  • Pull requests are welcome

Usage

  • create-repack-app name_of_app
  • You will be asked if you have create-react-app installed globally.
    • If you say yes and you don't it will break
    • If you say no the program will exit
  • You will be asked what port you want to run your rails server on. The default is 3001. I reccomend not using 3000 as this is the default port for create-react-app and it is easier to change the rails port.
  • If you change your rails port in the future you will need to update the proxy in client/package.json
  • The rails app is located in the root and the react app is located in /client

Options

--full

IMPORTANT: When using the full flag you must be on v 3.1.0 or higher due to changes in create-react-app 2.0.0

You also have the option to add --full flag, this is going to add Devise to Rails, and add React-Router, Redux, Semantic-UI to React (/client)

This flag includes a basic component set up for authentication with a nav bar, register page and login page.

Reusable components

You will find some reusable components in client/components

  • ProtectedRoute

    ProtectedRoute will allow you to redirect unauthorized users to the login page.

    If the users are logged in, will redirect them to the Hello example

    <ProtectedRoute exact path='/hello' component={Hello} />
  • AuthRoute

    AuthRoute are used to prevent the authorized users hit the login or register route again if the are already logged.

    If the users are logged in, will redirect them to the homepage.

    <AuthRoute exact path='/register' component={Register} />

-y

For frequent users, this will skip all setup questions and default rails port to 3001

Deploy

If you are deploying to heroku you will need to update the buildpacks: NOTE: The order does matter.

heroku buildpacks:clear
heroku buildpacks:set heroku/nodejs
heroku buildpacks:add heroku/ruby --index 2

All you have to do now is push to heroku.

If you are deploying anywhere else you will need to run the following scripts in the root as part of your deploy process:

yarn build
yarn deploy

Or if you prefer:

npm run build
npm run deploy

Truth

This package is not complicated. It is really just a cli that runs other cli's.

First it installs rails.

Then it copies over a prefilled out config/routes and app/controllers/static_controller.rb as well as a package.json.

Then it installs create-react-app to the client/ folder.

Finally it adds a proxy to client/package.json

Oh yeah and the name is totally ripped off

Known issues

If Nokogiri updates this CLI will fail. The reason why is because it times out on the bundle install and moves on to the next command. To fix this you can do the following:

  1. cd app/you/created
  2. bundle
  3. cd ..
  4. rm -rf app/you/created
  5. create-repack-app app/you/created

I am looking into many solutions and I am open to ideas.