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

react-floki

v1.0.96

Published

A React component, container and test generation library

Downloads

149

Readme



We’re always looking for people who value their work, so come and join us. We are hiring!

Installation

Globally install react-generate

npm install -g react-floki

OR

yarn global add react-floki

Examples of generated files

Generating containers with tests and stories

Generate components with tests and stories

Documentation

Help

To get a list of commands and usage hints use

react-generate --help

Creating a new React Application

react-generate init movie-rating

Generating tests for all existing components and containers

Creating a test for a container or component: react-generate gt

Creating a test for an existing component: react-generate gtcom

Creating a test for an existing container: react-generate gtcon

Forcefully generating tests for all existing components and containers

Forcefully creating a test for a container or component: react-generate gtf

Forcefully creating a test for an existing component: react-generate gtcomf

Forcefully creating a test for an existing container: react-generate gtconf

Generating components and containers

Creating a container or component: react-generate g

Creating a component: react-generate gcom

Creating a container: react-generate gcon

Forcefully generating components and containers

Forcefully creating a container or component: react-generate gf

Forcefully creating a component: react-generate gcomf

Forcefully creating a container: react-generate gconf

Generating tests for all existing components and containers

Generate test for all components in directory: react-generate --all component <path-to-components>

Generate test for all containers in directory: react-generate --all containers <path-to-containers>

Generating a testUtils file with some utility functions for tests

Generate a test util file: react-generate gtutil

Generating a utility for a loadable file using React 16 lazy and Suspense

Generating a utility for a loadable file : react-generate gloadable

Advanced

Example Usages

Creating a test by specifying type, path and name: react-generate gt component src/app Button

Creating a test for an existing component by specifying path and name: react-generate gtcom src/app Button

Creating a test for an existing container by specifying path and name: react-generate gtcon src/app HomePage

Creating a component/container by specifying type, path and name: react-generate g component src/app Button

Creating a component by specifying path and name: react-generate gcom src/app Button

Creating a container by specifying path and name: react-generate gcon src/app HomePage

Generate test for all components in directory: react-generate --all component src/app/components

Generate test for all containers in directory: react-generate --all container src/app/containers

Projects using it