Skip to content

📦 Quickly generate redistributable react sfc components

License

Notifications You must be signed in to change notification settings

seiwhale/react-sfc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-sfc-cli

Build status NPM Download NPM Version NPM License PRs Welcome

react-sfc-cli is a powerful tool for developing react single-file component.

It makes writing docs and demo easily, integrated with an automated github workflow, and is always ready to publish to npm with best practices.

Install

$ npm i react-sfc-cli -g

Usage

npx react-sfc-cli

# After filling the prompt
cd my-component

# Use git to initialize, so you can use the commit hook
git init

# Install dependency
yarn

# Develop component
yarn dev

Options

-u, --upgrade

According to the template files in the templates directory, new files will be generated and override the files with same name in current component directory. The default override files is defined in update-files.js. This option often used to upgrade the configuration of old components using the latest version of react-sfc-cli:

# cd my-component
npx react-sfc-cli -u

—files

If you want to update additional files, you can pass this option, multiple files use , to separate

npx react-sfc-cli -u --files package.json,.babelrc.js

—test

Generate a component template for testing, commonly used in CI .

npx react-sfc-cli --test

About

📦 Quickly generate redistributable react sfc components

Resources

License

Stars

Watchers

Forks

Packages

No packages published