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

create-react-prime

v4.10.0

Published

Code for the create-react-prime CLI

Downloads

296

Readme

Create React Prime

This CLI tool allows you to easily install and setup react-web, react-mobile and react-web-contentful. Check their repositories for more information.

Quick start

npx create-react-prime@latest
cd <project name>
npm start

or

npm init react-prime@latest
cd <project name>
npm start

Arguments

Passing arguments to the CLI is optional! The CLI will prompt questions for any missing required arguments. The order they are passed determines what they are used for.

Options

Passing options to the CLI is optional! The CLI will prompt questions for any missing required options.

Development

Make sure to read further before you start developing on the Create React Prime CLI tool!

create-react-prime

The internals are located in the lib folder. This folder acts as an internal NPM package that can be referenced with @crp anywhere in this project. Make sure to discuss with the team beforehand if you want to add changes to the internal code.

Modules

Modules are located in the src folder. Here you can find the logic for every installation process that this CLI tool has to offer. It's not necessary to request for changes in this section of the codebase, but it's always good to discuss your plans with the team beforehand.

Make sure to familiarize yourself with the code style and folder/file structure before you start writing code!

Testing NPX

You should always test a new Create React Prime flow on npx before making a merge request. Here is a step-by-step guide how to do that:

  1. Push your feature branch to GitHub
  • this is important! Create React Prime will need to download this branch
  1. Set your current branch to the feature branch you want to test
  2. Check what the latest beta version is
  3. Update the version in prime-monorepo/packages/create-react-prime/package.json to some version higher than the current + the tag! Also, Make sure to still follow semver!
  • If it's a non-breaking change or bugfix: increase the last number;
  • if it's a breaking change or new feature: increase the second number.

For example: v4.5.8 -> v4.5.9-beta.1

More information on semver

❗️ Do not push these changes to package.json to git!

  1. Run this script in the prime-monorepo/packages/create-react-prime folder:

npm publish --tag beta

To use this version, run: npx create-react-prime@beta. Create React Prime will now use the branch that it was published from.

Multiple beta versions

You can push multiple beta versions of the same release. Simply change -beta.1 to -beta.2 in package.json and run npm publish --tag beta again. You can use this new version by running npx create-react-prime@beta again (it can take a few seconds for this version to be ready on npx)

Other tags

You can use other tags than beta if you want. This can be useful for debugging purposes where you don't want to spam the beta tag with many versions. To do that, simply replace beta in the step-by-step guide with the tag of your choice. Examples would be: alpha, dev, next, canary.