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

@strax77/reactcmd

v1.2.0

Published

Missing react cli

Downloads

0

Readme

reactcmd

Missing react cli.

Install

npm i -g @strax77/reactcmd

Commands

generate component

reactcmd g c <name> [dir]

Generate new component

Positionals:
  name  Name of the component                                [string] [required]
  dir   Directory of the component                                      [string]

Options:
      --version                 Show version number                    [boolean]
  -s, --style                   Styling. Detected automatically
        [string] [choices: "sc", "emotion", "aphrodite", "radium", "styled-jsx",
                                     "linaria", "less", "css", "stylus", "sass"]
      --cssmodules, --cssm      Use CSS modules?                       [boolean]
      --classname, --cn         CSS class                               [string]
      --ugly                    Disable styling?                       [boolean]
  -t, --tag                     JSX tag                [string] [default: "div"]
      --pure                    Memoize the component?                 [boolean]
      --sb                      Create stories?                        [boolean]
      --test                    Create tests?                          [boolean]
      --cc                      Class component?                       [boolean]
      --fc                      Functional component?                  [boolean]
      --componentfile, --cfile  Name of the component file
                                                     [string] [default: "index"]
      --stylefile, --sfile      Name of the style file
                                                    [string] [default: "styles"]
      --testfile, --tfile       Name of the test file [string] [default: "test"]
      --storiesfile, --sbfile   Name of the stories file
                                                   [string] [default: "stories"]
      --mobx                    Wrap in mobx observer?                 [boolean]
      --redux                   Wrap in redux connect?                 [boolean]
      --testlib                 Testing library. Detected automatically
                                             [string] [choices: "rtl", "enzyme"]
      --testrunner              Test runner. Detected automatically
                                                      [string] [choices: "jest"]
  -l, --lang                    Language. Detected automatically
                                                  [string] [choices: "js", "ts"]
      --dry                     Do not write generated files to disk   [boolean]
  -y                            Auto confirm all prompts               [boolean]
  -q, --quite                   Suppress output                        [boolean]
  -h, --help                    Show help                              [boolean]

generate next page

reactcmd g next p <path> [dir]

Generate new next.js page

Positionals:
  path  Path to the page relative to next.js pages folder. Examples:
        article/[slug], index                                [string] [required]
  dir   Next.js pages folder                         [string] [default: "pages"]

Options:
      --version  Show version number                                   [boolean]
      --gsp      getStaticProps?                                       [boolean]
      --gsps     getStaticPaths?                                       [boolean]
      --gssp     getServerSideProps?                                   [boolean]
  -l, --lang     Language. Detected automatically [string] [choices: "js", "ts"]
  -t, --tag      JSX tag                               [string] [default: "div"]
      --pure     Memoize the component?                                [boolean]
      --cc       Class component?                                      [boolean]
      --fc       Functional component?                                 [boolean]
      --mobx     Wrap in mobx observer?                                [boolean]
      --redux    Wrap in redux connect?                                [boolean]
      --dry      Do not write generated files to disk                  [boolean]
  -y             Auto confirm all prompts                              [boolean]
  -q, --quite    Suppress output                                       [boolean]
  -h, --help     Show help                                             [boolean]

Config

reactcmd uses cosmiconfig to search for the configuration file. Supported formats:

  • .reactcmdrc or .reactcmdrc.json file in the project root folder
  • reactcmd key in package.json

Example config:

{
  "srcDir": "./src",
  "lang": "ts",
  "commands": {
    "generateComponent": {
      "style": "less",
      "pure": true,
    }
  }
}

Setup config using short Q&A:

reactcmd setup config