Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-creates

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-creates

React creates for you useful and common tools that adapt themselves to your project for faster and easier development

  • 2.1.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

React Creates (CLI) ⚛️

Simple and easy to use react CLI.
React creates for you useful and common tools that adapt themselves to your project for faster and easier development

Table of content

  • Getting Started ⬇️
  • Features
  • Support 👨‍🔧
  • Contributing 👩‍💻

You can go to ways:

  • Smart (Zero configuration)
  • Advance (Configure by your needs)

Getting Started ⬇️

Write this in the terminal inside your react project:

npx react-creates component MyComponent

Will generate for you:

📦MyComponent
 ┣ 📜MyComponent.js
 ┣ 📜MyComponent.test.js
 ┣ 📜index.js
 ┗ 📜style.css

Feeling Lazy

Try the VSCode extension

Features

React Creates will support as many cases as it can, You need a use case it doesn't support? Please open issue.

You want to create flow for that use case? You are more than welcome! Learn how here.

Current features:

Default values

If you want to make sure all component will have the same features (styling, type, etc..), you can specify it in your package.json For example:

{
"name": "my-project",
"version": "0.1.0",
...
 "react-creates": {
    "style": "scss"
  },
...
}

Component

React lets you define components as classes or functions, but why you need to write it every time? Here how to create one in seconds:

Start

npx react-creates component <name>

Options

OptionDefaultTypeDescription
--scssfalsebooleanForce scss style
--cssfalsebooleanForce css style
--sassfalsebooleanForce sass style
-l --language <scripting>Calculated (Checks for tsconfig to determent)typescript or javascriptSelect the language you want the component to be
-d --directory <target>process.cwd()stringComponent directory
-t --type <component>function or classWhat type of the component it should be.
-pt --prop-typesfalsebooleanShould add Prop-types. Only works if inside javascript project
-f --functionfalsebooleanForce function component
-c --classfalsebooleanForce class component
-s --style <styling>css, scss, sassSelected style
--skip-testfalsebooleanWill not create test file
--skip-cachefalsebooleanWon't save cache values
--ignore-cachefalsebooleanWon't use cache values
--dry-runfalsebooleanOnly logs the options

Examples

npx react-creates component MyComponent

npx react-creates component MyComponent --type class

npx react-creates component MyComponent --style sass

npx react-creates component MyComponent -d /Users/project/cool-project

npx react-creates component MyComponent -l typescript

Support 👨‍🔧

Please open an issue for support.

Contributing 👩‍💻

Please contribute using contributing guide. Create a branch, add commits, and open a pull request.

Keywords

FAQs

Package last updated on 03 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc